From 98a26b7a16c09b3d38e011773194c103475931b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 14 Nov 2021 11:46:43 +0100 Subject: [PATCH] Fix linter (#117) * Fix linter warnings --- README.md | 2 +- README_fr.md | 2 +- manifest.json | 2 +- scripts/_common.sh | 2 +- scripts/install | 9 ++++++++- scripts/remove | 8 ++++++++ scripts/restore | 11 +++++++++-- scripts/upgrade | 9 ++++++++- 8 files changed, 37 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2e88dce..66e54bc 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 Manage MySQL databases over the web -**Shipped version:** 5.1.1~ynh2 +**Shipped version:** 5.1.1~ynh3 **Demo:** https://demo.phpmyadmin.net/master-config diff --git a/README_fr.md b/README_fr.md index e62f40a..60729e7 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 Application web de gestion des bases de données MySQL -**Version incluse :** 5.1.1~ynh2 +**Version incluse :** 5.1.1~ynh3 **Démo :** https://demo.phpmyadmin.net/master-config diff --git a/manifest.json b/manifest.json index 2fcb724..b80069a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Manage MySQL databases over the web", "fr": "Application web de gestion des bases de données MySQL" }, - "version": "5.1.1~ynh2", + "version": "5.1.1~ynh3", "url": "http://www.phpmyadmin.net", "upstream": { "license": "GPL-2.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 45d51fa..e07fa79 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}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-mbstring" +pkg_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-mbstring" YNH_COMPOSER_VERSION=2.0.14 diff --git a/scripts/install b/scripts/install index 809b57e..e2d78d8 100644 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,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=admin --value=$admin +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -106,7 +113,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 #================================================= # SPECIFIC SETUP diff --git a/scripts/remove b/scripts/remove index d95d4fd..2c3895a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -34,6 +34,14 @@ ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name # Remove phpmyadmin MySQL admin user ynh_mysql_drop_user $db_admin_user +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index 3505835..32c669d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -93,14 +93,21 @@ chown $app: $final_path/tmp #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= - ynh_script_progression --message="Reconfiguring PHP-FPM.." --weight=6 # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$YNH_PHP_VERSION/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 #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 97bef41..425d2f1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -125,13 +125,20 @@ 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 #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE