From c5edeaec034369dd574c0d2b6a4be4703eb8b48f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:16:57 +0200 Subject: [PATCH 1/9] 5.2.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 5 ++--- scripts/upgrade | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/conf/app.src b/conf/app.src index 347b4e5..482ab15 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/Jermolene/TiddlyWiki5/archive/v5.1.23.tar.gz -SOURCE_SUM=a35f8a4cb25f1f75e49ec40dcc9b1cd7ef4fb099322507464272be720fdc28d3 +SOURCE_URL=https://github.com/Jermolene/TiddlyWiki5/archive/v5.2.2.tar.gz +SOURCE_SUM=f381c601df68047dfea8f7479fd07b7d274e039d876ed14904fd7727a8ed0401 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 684da99..6614845 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Non-linear personal web notebook", "fr": "Carnet Web personnel non linéaire" }, - "version": "5.1.23~ynh5", + "version": "5.2.2~ynh1", "url": "https://tiddlywiki.com/", "upstream": { "license": "BSD-2-Clause", diff --git a/scripts/install b/scripts/install index 35b3a40..74f22eb 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 install -g tiddlywiki + ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install -g tiddlywiki ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server popd @@ -108,8 +108,7 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file=../conf/systemd.service - +env_path="$PATH" ynh_add_systemd_config #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 532ec7f..6dfb029 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -115,8 +115,7 @@ ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 -ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file=../conf/systemd.service - +env_path="$PATH" ynh_add_systemd_config #================================================= From 76bb8744a4a4e3448c17922ebc9472c96a968cca Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 22 May 2022 07:17:05 +0000 Subject: [PATCH 2/9] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d44632..2c3df4d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable WikiText. -**Shipped version:** 5.1.23~ynh5 +**Shipped version:** 5.2.2~ynh1 **Demo:** https://tiddlywiki.com/ diff --git a/README_fr.md b/README_fr.md index 4973442..e019377 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a single HTML file in the browser or as a powerful Node.js application. It is highly customisable: the entire user interface is itself implemented in hackable WikiText. -**Version incluse :** 5.1.23~ynh5 +**Version incluse :** 5.2.2~ynh1 **Démo :** https://tiddlywiki.com/ From eeae3d5784adcbac2fb142017d2c52380e0a7228 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:18:15 +0200 Subject: [PATCH 3/9] Node 18 --- scripts/_common.sh | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 7912aa4..9195d57 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=14 +nodejs_version=18 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 74f22eb..154c2c2 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 - ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install -g tiddlywiki + ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install tiddlywiki ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server popd From d49f99b982003c4dcd922f66f52c130de188c3e1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:24:01 +0200 Subject: [PATCH 4/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 154c2c2..6b14fe0 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 - ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm install tiddlywiki + npm install tiddlywiki ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server popd From 52661c7793551dbbbc519f036c0ec1095eb052f7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:28:13 +0200 Subject: [PATCH 5/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6b14fe0..2ec1f51 100755 --- a/scripts/install +++ b/scripts/install @@ -100,7 +100,7 @@ ynh_script_progression --message="Configuring TiddlyWiki..." --weight=2 pushd $final_path ynh_use_nodejs npm install tiddlywiki - ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server + tiddlywiki mynewwiki --init server popd #================================================= From b8e05bc3a0480fcbfc0600e5f98332ca1a8d5639 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:31:37 +0200 Subject: [PATCH 6/9] Fix --- scripts/_common.sh | 2 +- scripts/install | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9195d57..7912aa4 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=18 +nodejs_version=14 #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 2ec1f51..6b14fe0 100755 --- a/scripts/install +++ b/scripts/install @@ -100,7 +100,7 @@ ynh_script_progression --message="Configuring TiddlyWiki..." --weight=2 pushd $final_path ynh_use_nodejs npm install tiddlywiki - tiddlywiki mynewwiki --init server + ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server popd #================================================= From cd2949128798a5d5458b23e0b3b2b270ac6c21cd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:35:08 +0200 Subject: [PATCH 7/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6b14fe0..56ff75b 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 install tiddlywiki + npm -g install tiddlywiki ynh_exec_as $app env $ynh_node_load_PATH tiddlywiki mynewwiki --init server popd From 4e94931299d5e8c2fdd248c3aa40352615a77003 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 09:56:17 +0200 Subject: [PATCH 8/9] 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 #================================================= From e0820140f2d7941028987195e7a3d3376f39277a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 22 May 2022 10:43:07 +0200 Subject: [PATCH 9/9] Update restore --- scripts/restore | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/restore b/scripts/restore index d0f22ab..d244e4f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -47,13 +47,6 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# RESTORE THE APP MAIN DIR -#================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=1 - -ynh_restore_file --origin_path="$final_path" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -62,6 +55,13 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei # Create the dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir=$final_path +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_script_progression --message="Restoring the app main directory..." --weight=1 + +ynh_restore_file --origin_path="$final_path" + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path"