From a24c8d74d58a9196860d92a454715afb943dc92f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 31 Jan 2021 14:03:21 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b462dca..5f2b821 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -140,6 +140,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies" +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Installing Composer..." --weight=1 + +# Upgrade composer itself +ynh_install_composer --phpversion=${phpversion} --workdir=$final_path --install_args="--prefer-source --no-dev" + #================================================= # SETUP APPLICATION CONFIG #================================================= @@ -157,14 +165,6 @@ ynh_replace_string --match_string="__PUBLICPATH__" --replace_string="$public_pat # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/.env" -#================================================= -# PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Installing Composer..." --weight=1 - -# Upgrade composer itself -ynh_install_composer --phpversion=${phpversion} --workdir=$final_path --install_args="--prefer-source --no-dev" - #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= @@ -173,9 +173,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading Lychee source files..." --weight=4 pushd $final_path - php$phpversion artisan migrate --no-interaction - #php$phpversion artisan config:clear --no-interaction - #php$phpversion artisan config:cache --no-interaction + php$phpversion artisan key:generate --no-interaction --force + php$phpversion artisan migrate --no-interaction --force popd fi