From 4e94931299d5e8c2fdd248c3aa40352615a77003 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:56:17 +0200 Subject: [PATCH] update --- scripts/_common.sh | 4 +++- scripts/install | 2 +- scripts/upgrade | 16 ++++++++-------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 7912aa4..2f983d2 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,9 @@ # COMMON VARIABLES #================================================= -nodejs_version=14 +nodejs_version="14" + +tiddlywiki_version="5.2.2" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 56ff75b..9b4ebc9 100755 --- a/scripts/install +++ b/scripts/install @@ -99,7 +99,7 @@ ynh_script_progression --message="Configuring TiddlyWiki..." --weight=2 pushd $final_path ynh_use_nodejs - npm -g install tiddlywiki + npm -g install tiddlywiki@${tiddlywiki_version} ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server popd diff --git a/scripts/upgrade b/scripts/upgrade index 6dfb029..e1dbfd4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,6 +69,13 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action=stop +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_nodejs --nodejs_version=$nodejs_version + #================================================= # CREATE DEDICATED USER #================================================= @@ -87,7 +94,7 @@ then pushd $final_path ynh_use_nodejs - npm update -g tiddlywiki + npm update -g tiddlywiki@${tiddlywiki_version} popd fi @@ -103,13 +110,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_nodejs --nodejs_version=$nodejs_version - #================================================= # SETUP SYSTEMD #=================================================