From bf15ad8a90c3c840bb802d022fc3c06dc864d1b4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 29 Jan 2021 16:08:30 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c912377..99878f5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -79,21 +79,27 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading Composer..." --weight=1 + +# Upgrade composer itself +ynh_install_composer + #================================================= # INSTALL AND INITIALIZE COMPOSER #================================================= ynh_script_progression --message="Installing Composer..." --weight=10 -# Install Composer -ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev" - if [ "$upgrade_type" == "UPGRADE_APP" ] then + # install the PHP dependencies using Composer + ynh_exec_warn_less ynh_composer_exec --commands="install --no-dev" + ynh_script_progression --message="Upgrading source files..." --weight=4 pushd $final_path - php$phpversion artisan migrate - php$phpversion artisan cache:clear - php$phpversion artisan view:clear + php$phpversion artisan migrate && php$phpversion artisan cache:clear && php$phpversion artisan view:clear popd fi