From 9de6985a778609be8b762ef980f0e9b2fcfd8514 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 15 May 2021 08:36:21 +0200 Subject: [PATCH] Fix --- check_process | 8 ++++---- conf/app.src | 4 ++-- manifest.json | 4 ++-- scripts/install | 1 - scripts/upgrade | 17 +---------------- 5 files changed, 9 insertions(+), 25 deletions(-) diff --git a/check_process b/check_process index 15aa133..85e5f61 100644 --- a/check_process +++ b/check_process @@ -1,9 +1,9 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + admin="john" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/conf/app.src b/conf/app.src index dffdaa9..d2932ef 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/hedgedoc/hedgedoc/releases/download/1.8.0/hedgedoc-1.8.0.tar.gz -SOURCE_SUM=ebc4565d45fd77adf77f9255bf176572b6d9762d7601b2eb9ab551c2b521de80 +SOURCE_URL=https://github.com/hedgedoc/hedgedoc/releases/download/1.8.2/hedgedoc-1.8.2.tar.gz +SOURCE_SUM=e325d433aba6f5e9de91162dd97a605e29ebc5e740750cd47054abfdc1f8fd42 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 6f7c41b..b60c104 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,14 @@ "en": "Collaborative editor to work on notes written in Markdown", "fr": "Éditeur collaboratif pour travailler sur des notes en Markdown" }, - "version": "1.8.2~ynh1", + "version": "1.8.2~ynh2", "url": "https://github.com/hedgedoc/hedgedoc", "license": "AGPL-3.0-only", "maintainer": { "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index f9eb446..b23f0a9 100644 --- a/scripts/install +++ b/scripts/install @@ -86,7 +86,6 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_name --db_name=$db_name diff --git a/scripts/upgrade b/scripts/upgrade index 807341c..9afcd92 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,23 +82,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=10 - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - cp -a "$final_path/config.json" "$tmpdir/config.json" - - # Remove the app directory securely - ynh_secure_remove --file=$final_path - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$final_path - - #Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/config.json" "$final_path/config.json" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + ynh_setup_source --dest_dir=$final_path --keep="$final_path/config.json" fi #=================================================