From 5680fa183725ed55001c2c49f485ece0d0cdf936 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Tue, 23 Nov 2021 21:09:20 +0100 Subject: [PATCH] Update: Update to nodejs 16 --- scripts/_common.sh | 2 +- scripts/upgrade | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 589471e..30b5a4a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= RUBY_VERSION="2.7.3" -NODEJS_VERSION="15.11.0" +NODEJS_VERSION="16" syncing_server_js_version="1.42.9" auth_version="1.29.0" diff --git a/scripts/upgrade b/scripts/upgrade index dbc3ad9..6f19bd1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -275,6 +275,12 @@ if [ -e "$final_path/live/auth-worker" ]; then ynh_secure_remove --file="$final_path/live/auth-worker" fi +# Remove nodejs if current version is lower than 2021.11.22 +if ynh_compare_current_package_version --comparison lt --version 2021.11.22~ynh1 +then + ynh_remove_nodejs +fi + #================================================= # CREATE DEDICATED USER #================================================= @@ -386,7 +392,6 @@ ynh_install_app_dependencies $pkg_dependencies ynh_install_nodejs --nodejs_version=$NODEJS_VERSION ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ stable main" --package="yarn" --key="https://dl.yarnpkg.com/debian/pubkey.gpg" - #================================================= # SPECIFIC UPGRADE #=================================================