From d6855e0becef733494450a051937a72ca5b3e87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 May 2024 23:27:11 +0200 Subject: [PATCH 1/5] cleaning --- scripts/backup | 6 +----- scripts/install | 1 - scripts/upgrade | 17 +++-------------- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/scripts/backup b/scripts/backup index f8e82aa..38d96c5 100644 --- a/scripts/backup +++ b/scripts/backup @@ -22,15 +22,11 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index aedf981..9d1fe35 100644 --- a/scripts/install +++ b/scripts/install @@ -45,7 +45,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/upgrade b/scripts/upgrade index dce977e..8ecb28a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -34,14 +28,10 @@ ynh_remove_logrotate #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=10 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=10 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="server/config.js" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="server/config.js" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" @@ -62,7 +52,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config From 58152d73739f15b3e01b367414fd7d05167a2fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:10:05 +0200 Subject: [PATCH 2/5] cleaning --- scripts/change_url | 2 +- scripts/remove | 5 ++--- scripts/upgrade | 16 ++++++---------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 5df6755..25000f2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name="$app" --action="stop" +ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/remove b/scripts/remove index c5feb91..a9a1baf 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,9 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status "$app" >/dev/null diff --git a/scripts/upgrade b/scripts/upgrade index 8ecb28a..501e89e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,17 +72,13 @@ chown "$app:" "$install_dir/server/config.js" #================================================= # BUILD APP #================================================= +ynh_script_progression --message="Building app... (this will take some time and resources!)" --weight=16 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Building app... (this will take some time and resources!)" --weight=16 - - pushd "$install_dir" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" install - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" run build - popd -fi +pushd "$install_dir" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" install + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" run build +popd #================================================= # START SYSTEMD SERVICE From 63d519ed928d6d7350d8001287a28ad437e1c0f6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jun 2024 20:10:11 +0000 Subject: [PATCH 3/5] Auto-update READMEs --- ALL_README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) From b0da27c1aa5f6d0211ba765c36593cec853c7dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:50:04 +0200 Subject: [PATCH 4/5] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 71839a2..efd11e1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Send" description.en = "File sharing which allows to send encrypted files" description.fr = "Partage de fichiers qui permet d'envoyer des fichiers chiffrés" -version = "3.4.23~ynh3" +version = "3.4.23~ynh4" maintainers = [] From eea08bc9cd8eecae93d8d236961cd59907db0278 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jun 2024 20:50:09 +0000 Subject: [PATCH 5/5] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d3e720e..9d017c0 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ A fork of Mozilla's Firefox Send. Mozilla discontinued Send, this fork is a comm Send is a file sharing experiment which allows you to send encrypted files to other users. -**Shipped version:** 3.4.23~ynh3 +**Shipped version:** 3.4.23~ynh4 **Demo:** diff --git a/README_es.md b/README_es.md index 1e421d2..b32bad3 100644 --- a/README_es.md +++ b/README_es.md @@ -20,7 +20,7 @@ A fork of Mozilla's Firefox Send. Mozilla discontinued Send, this fork is a comm Send is a file sharing experiment which allows you to send encrypted files to other users. -**Versión actual:** 3.4.23~ynh3 +**Versión actual:** 3.4.23~ynh4 **Demo:** diff --git a/README_eu.md b/README_eu.md index b498b5c..5c1f132 100644 --- a/README_eu.md +++ b/README_eu.md @@ -20,7 +20,7 @@ A fork of Mozilla's Firefox Send. Mozilla discontinued Send, this fork is a comm Send is a file sharing experiment which allows you to send encrypted files to other users. -**Paketatutako bertsioa:** 3.4.23~ynh3 +**Paketatutako bertsioa:** 3.4.23~ynh4 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 77c983a..8805282 100644 --- a/README_fr.md +++ b/README_fr.md @@ -20,7 +20,7 @@ Un fork du Firefox Send de Mozilla. Mozilla a arrêté Send, et ce fork est un e Send est une expérience de partage de fichiers qui permet d'envoyer des fichiers chiffrés à d'autres utilisateurs. -**Version incluse :** 3.4.23~ynh3 +**Version incluse :** 3.4.23~ynh4 **Démo :** diff --git a/README_gl.md b/README_gl.md index d03ddc4..95efaa1 100644 --- a/README_gl.md +++ b/README_gl.md @@ -20,7 +20,7 @@ A fork of Mozilla's Firefox Send. Mozilla discontinued Send, this fork is a comm Send is a file sharing experiment which allows you to send encrypted files to other users. -**Versión proporcionada:** 3.4.23~ynh3 +**Versión proporcionada:** 3.4.23~ynh4 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index bb49007..117b348 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -20,7 +20,7 @@ A fork of Mozilla's Firefox Send. Mozilla discontinued Send, this fork is a comm Send is a file sharing experiment which allows you to send encrypted files to other users. -**分发版本:** 3.4.23~ynh3 +**分发版本:** 3.4.23~ynh4 **演示:**