From 5ec918eb202a14c9e7c5c871e6ea67afd9e526bc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 6 Mar 2019 01:56:15 +0100 Subject: [PATCH] Fix upgrade --- manifest.json | 2 +- scripts/upgrade | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/manifest.json b/manifest.json index 4844694..c18b9d2 100644 --- a/manifest.json +++ b/manifest.json @@ -86,7 +86,7 @@ }, { "name": "website_title", - "type": "title", + "type": "string", "ask": { "en": "Your website's title.", "fr": "Le titre de votre site." diff --git a/scripts/upgrade b/scripts/upgrade index 74f70e5..28272ec 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,7 @@ ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get $app domain) -path_url=$(ynh_app_setting_get $app path_url) +path_url=$(ynh_app_setting_get $app path) admin=$(ynh_app_setting_get $app admin) is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) @@ -79,7 +79,7 @@ path_url=$(ynh_normalize_url_path $path_url) ynh_print_info "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src -#ynh_setup_source "$final_path" +ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION @@ -92,6 +92,7 @@ ynh_add_nginx_config #================================================= # UPGRADE DEPENDENCIES #================================================= +ynh_print_info "Upgrading dependencies..." #ynh_install_app_dependencies deb1 deb2 @@ -114,22 +115,19 @@ ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE #================================================= -# ... +# UPGRADE CONCRETE #================================================= +pushd $final_path + sudo ./concrete/bin/concrete5 c5:update --rerun --verbose --allow-as-root +popd + ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. #ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" # Recalculate and store the checksum of the file for the next upgrade. #ynh_store_file_checksum "$final_path/CONFIG_FILE" -ynh_setup_source "$final_path" - -pushd $final_path -sudo ./concrete/bin/concrete5 c5:update --rerun --verbose --allow-as-root -popd - - #================================================= # SETUP LOGROTATE #=================================================