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/ 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/_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 35b3a40..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 install -g tiddlywiki + npm -g install tiddlywiki@${tiddlywiki_version} 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/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" diff --git a/scripts/upgrade b/scripts/upgrade index 532ec7f..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,20 +110,12 @@ 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 #================================================= 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 #=================================================