diff --git a/scripts/upgrade b/scripts/upgrade index f2cd572..a336a25 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,13 +25,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) # CHECK VERSION #================================================= -if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then - upgrade_type="0.9.8" -elif ynh_compare_current_package_version --comparison le --version 1.0.7~ynh2; then - upgrade_type="1.1.0" -else - upgrade_type=$(ynh_check_app_version_changed) -fi +upgrade_type=$(ynh_check_app_version_changed) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP @@ -85,7 +79,8 @@ fi # UPGRADE TO 0.9.8 if necessary #================================================= -if [ "$upgrade_type" == "0.9.8" ] +if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1 + then ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5 # Download, check integrity, uncompress and patch the source from 0.9.8.src @@ -134,7 +129,7 @@ fi # UPGRADE TO 1.1.0 if necessary #================================================= -if [ "$upgrade_type" == "1.1.0" ] +if ynh_compare_current_package_version --comparison lt --version 0.1.1.0~ynh1 then ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5 # Download, check integrity, uncompress and patch the source from 0.9.8.src