diff --git a/scripts/upgrade b/scripts/upgrade index 87319e5..00d5bda 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,7 @@ source _common.sh source detect_arch source ynh_systemd_action +source ynh_check_app_version_changed source /usr/share/yunohost/helpers #================================================= @@ -35,6 +36,12 @@ final_path=$(ynh_app_setting_get $app final_path) db_name=$(ynh_app_setting_get $app db_name) port=$(ynh_app_setting_get $app port) +#================================================= +# CHECK VERSION +#================================================= + +upgrade_type=$(ynh_check_app_version_changed) + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -93,8 +100,11 @@ path_url=$(ynh_normalize_url_path $path_url) # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +if [ "$upgrade_type" == "UPGRADE_APP" ] +then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" +fi #================================================= # NGINX CONFIGURATION