diff --git a/scripts/upgrade b/scripts/upgrade index 7f2191f..f51672a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -67,8 +67,8 @@ then tmpdir="$(mktemp -d)" #cp -a "$final_path/.env " "$tmpdir/.env " - [[ -f "$final_path/public/uploads" ]] && cp -a "$final_path/public/uploads" "$tmpdir/public/uploads" - [[ -f "$final_path/storage/uploads" ]] && cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads" + [[ -f "$final_path/public/uploads" ]] && cp -a "$final_path/public/uploads" "$tmpdir/public/uploads/" + [[ -f "$final_path/storage/uploads" ]] && cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads/" # Remove the app directory securely ynh_secure_remove --file=$final_path @@ -76,8 +76,8 @@ then ynh_setup_source --dest_dir="$final_path" #cp -a "$tmpdir/.env " "$final_path/.env " - [[ -f "$tmpdir/public/uploads" ]] && cp -a "$tmpdir/public/uploads" "$final_path/public/uploads" - [[ -f "$tmpdir/storage/uploads" ]] && cp -a "$tmpdir/storage/uploads" "$final_path/storage/uploads" + [[ -f "$tmpdir/public/uploads" ]] && cp -a "$tmpdir/public/uploads/" "$final_path/public/uploads" + [[ -f "$tmpdir/storage/uploads" ]] && cp -a "$tmpdir/storage/uploads/" "$final_path/storage/uploads" # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" @@ -87,6 +87,10 @@ then ynh_add_config --template=../conf/.env.example --destination=$final_path/.env chmod 600 $final_path/.env + + pushd $final_path + ynh_install_composer --install_args="--no-dev" && php$phpversion artisan migrate --no-interaction --force + popd fi chmod 755 $final_path @@ -116,25 +120,25 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config -#================================================= -# INSTALL LYCHEE WITH COMPOSER -#================================================= -ynh_script_progression --message="Installing BookStack with Composer..." --weight=5 +# #================================================= +# # INSTALL LYCHEE WITH COMPOSER +# #================================================= +# ynh_script_progression --message="Installing BookStack with Composer..." --weight=5 -# Install composer -ynh_install_composer --phpversion=$phpversion --workdir=$final_path --install_args="--no-dev" +# # Install composer +# ynh_install_composer --install_args="--no-dev" && php$phpversion artisan migrate --no-interaction -#================================================= -# FINAL BOOKSTACK INSTALL -#================================================= -ynh_script_progression --message="Install BookStack" --weight=5 +# #================================================= +# # FINAL BOOKSTACK INSTALL +# #================================================= +# ynh_script_progression --message="Install BookStack" --weight=5 -pushd $final_path - php$phpversion artisan migrate --no-interaction - php$phpversion artisan cache:clear --no-interaction - php$phpversion artisan config:clear --no-interaction - php$phpversion artisan view:clear --no-interaction -popd +# pushd $final_path +# php$phpversion artisan migrate --no-interaction +# php$phpversion artisan cache:clear --no-interaction +# php$phpversion artisan config:clear --no-interaction +# php$phpversion artisan view:clear --no-interaction +# popd #================================================= # RELOAD NGINX