From c95abbbe85c33749eab75ddeaba67cb2edc019bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Jan 2022 22:18:44 +0100 Subject: [PATCH] 1.6.8 (#27) * 1.6.8 --- .github/workflows/updater.sh | 1 + README.md | 2 +- README_fr.md | 2 +- conf/app.src | 4 ++-- conf/nginx.conf | 5 ----- manifest.json | 4 ++-- scripts/_common.sh | 2 +- scripts/install | 9 ++++++++- scripts/remove | 8 ++++++++ scripts/restore | 13 ++++++++++--- scripts/upgrade | 7 +++++++ 11 files changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index dfd5950..2515af4 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -8,6 +8,7 @@ # The YunoHost-Apps organisation offers a template Action to run this script periodically # Since each app is different, maintainers can adapt its contents so as to perform # automatic actions when a new upstream release is detected. +exit 1 #================================================= # FETCHING LATEST RELEASE AND ITS ASSETS diff --git a/README.md b/README.md index e152106..7e0626d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Open source to-do list script -**Shipped version:** 1.6.7~ynh1 +**Shipped version:** 1.6.8~ynh1 **Demo:** https://www.mytinytodo.net/demo/ diff --git a/README_fr.md b/README_fr.md index b791ec0..33d4eea 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Gestionnaire de todo list -**Version incluse :** 1.6.7~ynh1 +**Version incluse :** 1.6.8~ynh1 **Démo :** https://www.mytinytodo.net/demo/ diff --git a/conf/app.src b/conf/app.src index 30ac527..adb312a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.7/mytinytodo-v1.6.7.zip -SOURCE_SUM=1e1bc65a4ba27eecdff71a85c8e292ef54185cdc9108e1e9507f7243df1a0157 +SOURCE_URL=https://github.com/maxpozdeev/mytinytodo/releases/download/v1.6.8/mytinytodo-v1.6.8.zip +SOURCE_SUM=5970a55045b2a589a72c1afcf0636d06d070f7e97c1afc8254669d5767641679 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index cfdefca..179ee75 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,11 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; try_files $uri $uri/ index.php; diff --git a/manifest.json b/manifest.json index 8f66925..db17966 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source to-do list script", "fr": "Gestionnaire de todo list" }, - "version": "1.6.7~ynh1", + "version": "1.6.8~ynh1", "url": "http://www.mytinytodo.net/", "upstream": { "license": "GPL-2.0", @@ -21,7 +21,7 @@ "email": "pierre.levasseur@free.fr" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index fa5e714..bfd0e68 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" +pkg_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-pdo" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index b34d461..89132ce 100644 --- a/scripts/install +++ b/scripts/install @@ -47,6 +47,13 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -96,7 +103,7 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/remove b/scripts/remove index 71e6329..886445d 100644 --- a/scripts/remove +++ b/scripts/remove @@ -55,6 +55,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 62d4203..d48cdbf 100644 --- a/scripts/restore +++ b/scripts/restore @@ -35,8 +35,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -79,7 +78,15 @@ chmod 775 $final_path/tmp/sessions ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" # Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config + +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index fbbdf0e..f1e2b46 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -103,6 +103,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # PHP-FPM CONFIGURATION #=================================================