From 2ba27458b85bb9da4bb053305d50c39ece51cbda Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 2 Oct 2021 21:14:12 +0200 Subject: [PATCH] Upgrade to 4.5.0 RC --- check_process | 4 ---- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/restore | 2 ++ scripts/upgrade | 29 ++++++++++++++--------------- 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/check_process b/check_process index f1d52d9..a4dae0a 100644 --- a/check_process +++ b/check_process @@ -11,8 +11,6 @@ setup_private=1 setup_public=1 upgrade=1 - #4.3.0 (#47) - upgrade=1 from_commit=1d967a751135c3801ef95cf989ab3fb9e45e6f70 #4.4.0 upgrade=1 from_commit=9edf3d60ea391925f835ece1309bbcb54e6d33fe backup_restore=1 @@ -22,8 +20,6 @@ Email=anmol@datamol.org Notification=yes ;;; Upgrade options - ; commit=1d967a751135c3801ef95cf989ab3fb9e45e6f70 - name= 4.3.0 ; commit=9edf3d60ea391925f835ece1309bbcb54e6d33fe name= 4.4.0 manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index 76e73de..ceb5b4e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.4.1.tar.gz -SOURCE_SUM=94b9a90c61afabff55e08ea53ff8532355349336fae439e168dbfe9364931479 +SOURCE_URL=https://builds.matomo.org/matomo-4.5.0-rc1.tar.gz +SOURCE_SUM=3486ce4d304a6a9b99606c660cca97aaea1843ebc3b0bfea4750b4c77119a600 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 44086a4..2a3e31c 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.4.1~ynh3", + "version": "4.5.0~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", diff --git a/scripts/restore b/scripts/restore index 4fe14e8..4c4c94a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -93,6 +93,8 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ ynh_script_progression --message="Restoring the cron file..." --weight=1 ynh_restore_file --origin_path="/etc/cron.d/$app" +chown root: "/etc/cron.d/$app" +chmod 644 "/etc/cron.d/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 3b0bee7..76f50e9 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,10 +27,23 @@ email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up Matomo before upgrading (may take a while)..." --weight=3 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -68,20 +81,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up Matomo before upgrading (may take a while)..." --weight=3 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #=================================================