From 735007ed09151715043a06a01b54454872fe59ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 9 Jun 2024 22:25:12 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0aa44ec..6d9ab11 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,6 +16,8 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=10 ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version +ynh_use_nodejs + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -65,7 +67,6 @@ chown -R $app:www-data "$install_dir" ynh_script_progression --message="Upgrading app..." --weight=10 pushd $install_dir/client - ynh_use_nodejs ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm ci ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm cache clean --force ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run generate @@ -78,7 +79,7 @@ popd #================================================= # UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..." +ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_add_config --template=".env" --destination="$install_dir/.env" @@ -86,9 +87,9 @@ chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" #================================================= -# SETUP SYSTEMD +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 +ynh_script_progression --message="Updating $app's configuration files..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config