From ad886c09c641183ef3af1a903fc8304ad23136e1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 8 Feb 2022 18:48:02 +0100 Subject: [PATCH] Testing (#69) * upgrade: gotta upgrade apt dependencies *before* calling core:update, because it needs the appropriate php version --- README.md | 2 +- README_fr.md | 2 +- doc/.DS_Store | Bin 6148 -> 0 bytes manifest.json | 2 +- scripts/upgrade | 26 +++++++++----------------- 5 files changed, 12 insertions(+), 20 deletions(-) delete mode 100644 doc/.DS_Store diff --git a/README.md b/README.md index f618e13..e174588 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 analytics platform for measuring Web statistics -**Shipped version:** 4.7.1~ynh1 +**Shipped version:** 4.7.1~ynh2 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 8d47cc3..38272c5 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 Plateforme d'analyse open source de mesure de statistiques Web -**Version incluse :** 4.7.1~ynh1 +**Version incluse :** 4.7.1~ynh2 **Démo :** https://demo.matomo.org diff --git a/doc/.DS_Store b/doc/.DS_Store deleted file mode 100644 index fc7b8a40949f5488c93362acd831b939baeb97b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}(4f5FRhvHZG_NQV$?;u*9L4J#4kxa*ejYsS>C`a479IX{>If$VN$)J*-xW z`T%`^a_!H1ls*J6!kro0TZFb;QK>x9_?wJp#>wZ%jsbuT#@Ta#5C8&H!WPHoFGBsK z3(|5PLS|}6P*A}LG}H^x-tjLoKy$Z@bM_HRka%6sUzJX(leEw&MqH*RMPAk2?geWt zwI4iu6!6D!gC&TdRE3N7zSF$wqY>nfiTxEJP&|{TVCf*e{_I^^2unymhWMi1+0Uw5I z(`m2wq9c0!{;VUWTU*_Z==WaEW;_VipY6VRKmPpX>)E&OKYso?H(9{&(>1c{a1OuG zxP_Y2xKxE!pD<#cJVBNAwJM2JV&tS|0=|VdSu}XqFCa z==YKO+k_-&(^-O0IE)-N7O@9~*;GWE%G?oy*>v;^7Z*8fEZTHnW@N16MrQ7W!p!LC z7bYB7WYM>t0nflq2A1q?Nc;cJ?dSiSN&e0=;2HR@7+~$~czb}a=^gL=TGp5im6P#xroI3|s*i)MY*Z diff --git a/manifest.json b/manifest.json index c602b0c..1383316 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.7.1~ynh1", + "version": "4.7.1~ynh2", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", diff --git a/scripts/upgrade b/scripts/upgrade index 4da8c79..6e1d232 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -98,6 +98,14 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # STANDARD UPGRADE STEPS +#================================================= +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -112,17 +120,8 @@ then # This condition is only for CI test to go through the upgrade process ynh_setup_source --dest_dir="$final_path" else - # Create a temporary directory - tmpdir="$(mktemp -d)" - - cp -a "$final_path/config/config.ini.php" "$tmpdir/config.ini.php" - # 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" - cp -a "$tmpdir/config.ini.php" "$final_path/config/config.ini.php" - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/config.ini.php" chown -R $app:www-data "$final_path" ynh_exec_as $app php${phpversion} $final_path/console core:update -n @@ -141,13 +140,6 @@ 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 #=================================================