From 01ff435ee8c25558ea88361db180b2a6f918a093 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 16 Feb 2020 11:51:50 +0100 Subject: [PATCH] Upgrade nodejs version --- scripts/_common.sh | 1 + scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 11 +++++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 6d58a5a..c1ffb11 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,7 @@ # dependencies used by the app pkg_dependencies="mongodb mongodb-server mongo-tools" +nodejs_version=12.15.0 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 4c7e1e3..53e71d6 100755 --- a/scripts/install +++ b/scripts/install @@ -75,7 +75,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_print_info --message="Installing dependencies..." -ynh_install_nodejs --nodejs_version="8.16.2" +ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs ynh_install_app_dependencies $pkg_dependencies diff --git a/scripts/restore b/scripts/restore index 0eb0e07..c2943ad 100644 --- a/scripts/restore +++ b/scripts/restore @@ -84,7 +84,7 @@ find "$final_path" -type d -print0 | xargs -0 chmod 750 ynh_print_info --message="Reinstalling dependencies..." # Define and install dependencies -ynh_install_nodejs --nodejs_version="8.16.2" +ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs ynh_install_app_dependencies $pkg_dependencies diff --git a/scripts/upgrade b/scripts/upgrade index 4880de0..3235033 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -138,7 +138,7 @@ fi if ynh_version_gt "3.55~ynh1" "${previous_version}" ; then # Install dependencies ynh_remove_nodejs - ynh_install_nodejs --nodejs_version="8.16.2" + ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs # Create a dedicated systemd config @@ -157,6 +157,13 @@ if ynh_version_gt "3.55~ynh1" "${previous_version}" ; then ynh_store_file_checksum "$config_file" fi +if ynh_version_gt "3.79~ynh1" "${previous_version}" ; then + # Install dependencies + ynh_remove_nodejs + ynh_install_nodejs --nodejs_version=$nodejs_version + ynh_use_nodejs +fi + #================================================= # CHECK THE PATH #================================================= @@ -214,7 +221,7 @@ ynh_add_nginx_config #================================================= ynh_print_info --message="Upgrading dependencies..." -ynh_install_nodejs --nodejs_version="8.16.0" +ynh_install_nodejs --nodejs_version=$nodejs_version ynh_use_nodejs ynh_install_app_dependencies $pkg_dependencies