From 94a1b4c84507c6fa2df51ff46543283b1db5382e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Nov 2021 10:50:01 +0100 Subject: [PATCH] 21.10.3 --- conf/app.src | 4 ++-- manifest.json | 6 +++--- scripts/_common.sh | 2 +- scripts/install | 12 ++++++++++-- scripts/remove | 8 ++++++++ scripts/restore | 10 ++++++++-- scripts/upgrade | 9 ++++++++- 7 files changed, 40 insertions(+), 11 deletions(-) diff --git a/conf/app.src b/conf/app.src index 2f85ae2..ed49582 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/refs/tags/v21.10.1.tar.gz -SOURCE_SUM=2ce88e6cfef3e9659e8fdf70c29fe8fd829e7388448c264c0612be2df7ba5f63 +SOURCE_URL=https://github.com/BookStackApp/BookStack/archive/refs/tags/v21.10.3.tar.gz +SOURCE_SUM=b22b0949103c6f34fa0613b9c40bed101e58821d401ee99efe437441451f6c86 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index c6dd88d..28ac9c9 100644 --- a/manifest.json +++ b/manifest.json @@ -4,9 +4,9 @@ "packaging_format": 1, "description": { "en": "Platform to create documentation/wiki content", - "fr": "Plateforme pour créer du contenu de documentation/wiki " + "fr": "Plateforme pour créer du contenu de documentation/wiki" }, - "version": "21.10.1~ynh1", + "version": "21.10.3~ynh1", "url": "https://www.bookstackapp.com/", "upstream": { "license": "MIT", @@ -21,7 +21,7 @@ "email": "liberodark@gmail.com" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index 57004cd..289f09f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="8.0" -extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd" +pkg_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-tidy php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd" YNH_COMPOSER_VERSION=2.1.1 diff --git a/scripts/install b/scripts/install index fefddee..d1694de 100644 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE +phpversion=$YNH_PHP_VERSION app=$YNH_APP_INSTANCE_NAME @@ -46,6 +47,14 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 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 +ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion + +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE A MYSQL DATABASE @@ -93,8 +102,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" -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +ynh_add_fpm_config #================================================= # INSTALL LYCHEE WITH COMPOSER diff --git a/scripts/remove b/scripts/remove index b43ce7a..c503650 100644 --- a/scripts/remove +++ b/scripts/remove @@ -30,6 +30,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=1 # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE THE REDIS DATABASE #================================================= diff --git a/scripts/restore b/scripts/restore index 8622189..2a271e3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,6 +66,14 @@ chown -R $app:www-data $final_path chmod -R o-rwx $final_path chmod 600 $final_path/.env +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -73,8 +81,6 @@ ynh_script_progression --message="Reconfiguring PHP-FPM..." --weight=5 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --package="$extra_php_dependencies" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a296737..8989bdd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,13 +92,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=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --package="$extra_php_dependencies" +ynh_add_fpm_config #================================================= # INSTALL LYCHEE WITH COMPOSER