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 #=================================================