diff --git a/README.md b/README.md index 2582275..fe1a51e 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Chitchatter is a free (as in both price and freedom) communication tool. It is d - Ephemeral - Decentralized -**Shipped version:** 1.0~ynh4 +**Shipped version:** 1.0~ynh5 **Demo:** https://chitchatter.im/ diff --git a/README_fr.md b/README_fr.md index f130e72..f54cb06 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ Chitchatter is a free (as in both price and freedom) communication tool. It is d - Ephemeral - Decentralized -**Version incluse :** 1.0~ynh4 +**Version incluse :** 1.0~ynh5 **Démo :** https://chitchatter.im/ diff --git a/check_process b/check_process deleted file mode 100644 index a55c27f..0000000 --- a/check_process +++ /dev/null @@ -1,24 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - #upgrade=1 from_commit=CommitHash - backup_restore=1 - multi_instance=1 - change_url=1 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. - manifest_arg=domain=DOMAIN&path=PATH&is_public=1&language=fr&admin=USER&password=pass&port=666& diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 7a77464..0000000 --- a/conf/app.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://github.com/jeremyckahn/chitchatter/archive/99a9ab783815e3bddeebd0de8ad74d010e5162b1.tar.gz -SOURCE_SUM=35d5521e0e96f9271f2437bae29af1f7edfe293d80be4353fbefdcccdbfe8258 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME=chitchatter -SOURCE_EXTRACT=true diff --git a/manifest.toml b/manifest.toml index de04411..c42ca14 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Chitchatter" description.en = "Peer-to-peer chat that is serverless, decentralized, and ephemeral" description.fr = "Chat peer-to-peer sans serveur, décentralisée et éphémère" -version = "1.0~ynh4" +version = "1.0~ynh5" maintainers = ["eric_G"] @@ -16,13 +16,13 @@ demo = "https://chitchatter.im/" code = "https://github.com/jeremyckahn/chitchatter" [integration] -yunohost = ">= 11.1.11" +yunohost = ">= 11.1.15" architectures = "all" multi_instance = true ldap = false sso = false disk = "50M" -ram.build = "50M" +ram.build = "2800M" ram.runtime = "50M" [install] @@ -35,6 +35,7 @@ ram.runtime = "50M" default = "visitors" [resources] + [resources.system_user] [resources.install_dir] diff --git a/scripts/_common.sh b/scripts/_common.sh index 05b2ccf..e19e0bb 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,7 @@ # nodejs version nodejs_version=16 +version_commit=442f5406ec26d001798c1a2b5a5d9a05fdc77459 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 936b8f0..7163eeb 100755 --- a/scripts/install +++ b/scripts/install @@ -21,10 +21,18 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Setting up source files..." --weight=4 -# Download, check integrity, uncompress and patch the source from GitHub -ynh_setup_source --dest_dir="$install_dir" +mkdir -p "$install_dir" +chown -R $app:www-data "$install_dir" + +git config --system --add safe.directory $install_dir + +# Download, check integrity, uncompress and patch the source from GitHub +git clone https://github.com/jeremyckahn/chitchatter "$install_dir" --quiet + +pushd "$install_dir" + git reset --hard --quiet $version_commit +popd -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" diff --git a/scripts/upgrade b/scripts/upgrade index 8d751be..c632857 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,13 +21,18 @@ upgrade_type=$(ynh_check_app_version_changed) if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_script_progression --message="Upgrading source files..." --weight=1 + ynh_script_progression --message="Upgrading source files..." --weight=5 - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" + pushd $install_dir + chown -R $app:www-data "$install_dir" + git config --system --add safe.directory $install_dir + + ynh_exec_as $app git fetch + ynh_exec_as $app git reset --hard --quiet $version_commit + ynh_exec_as $app git pull + popd fi -chmod 750 "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir"