diff --git a/scripts/upgrade b/scripts/upgrade index 3c4c2b2..8d7e7b6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -62,6 +62,15 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=5 + if [[ ! -f "$final_path/data" ]]; then + # config.ini.php is only created during the post-install process... + # it is therefore not present when the CI tests are carried out... + # This condition is only for CI test to go through the upgrade process + ynh_secure_remove --file="$final_path" + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" + else + tmpdir="$(mktemp -d)" # Backup the config file in the temp dir @@ -110,14 +119,7 @@ ynh_add_fpm_config --package="$extra_php_dependencies" # Set permissions to app files chown -R $app: $final_path - -#================================================= -# MODIFY A CONFIG FILE -#================================================= - -cp -a ../conf/config-dist.php "$final_path/config-dist.php" - -ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/data/config.php" +chmod -R 755 $final_path/data #================================================= # INTEGRATE SERVICE IN YUNOHOST