From 3fdf2644158e24b3feb6e2f9cb8d8a5ae7b60d84 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:01:08 +0200 Subject: [PATCH] Testing (#48) * Auto-update READMEs * cleaning * Update manifest.toml * Auto-update READMEs --------- Co-authored-by: yunohost-bot --- ALL_README.md | 4 +++- README.md | 4 ++-- README_es.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_eu.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ manifest.toml | 6 +++--- scripts/backup | 22 +++++---------------- scripts/remove | 5 ++--- scripts/restore | 4 ++-- scripts/upgrade | 16 +++------------ 12 files changed, 172 insertions(+), 43 deletions(-) create mode 100644 README_es.md create mode 100644 README_eu.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,8 @@ # All available README files by language - [Read the README in English](README.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) -- [Leggi il “README” in italiano](README_it.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index e3502d4..7d815c6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Haste with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=haste) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Haste quickly and simply on a YunoHost server.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* @@ -31,7 +31,7 @@ Haste is an open-source pastebin software written in node.js, which is easily in - Official app website: - Official user documentation: -- Upstream app code repository: +- Upstream app code repository: - YunoHost Store: - Report a bug: diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..b71562c --- /dev/null +++ b/README_es.md @@ -0,0 +1,50 @@ + + +# Haste para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/haste.svg)](https://dash.yunohost.org/appci/app/haste) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/haste.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/haste.maintain.svg) + +[![Instalar Haste con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=haste) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarHaste rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Haste is an open-source pastebin software written in node.js, which is easily installable in any network. YunoHost Project uses Haste as pastebin for log sharing: [paste.yunohost.org](https://paste.yunohost.org/) + + +**Versión actual:** 0.1.2023.09.21~ynh2 + +**Demo:** + +## Capturas + +![Captura de Haste](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación usuario oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/haste_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/haste_ynh/tree/testing --debug +o +sudo yunohost app upgrade haste -u https://github.com/YunoHost-Apps/haste_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..624edf8 --- /dev/null +++ b/README_eu.md @@ -0,0 +1,50 @@ + + +# Haste YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/haste.svg)](https://dash.yunohost.org/appci/app/haste) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/haste.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/haste.maintain.svg) + +[![Instalatu Haste YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=haste) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Haste YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Haste is an open-source pastebin software written in node.js, which is easily installable in any network. YunoHost Project uses Haste as pastebin for log sharing: [paste.yunohost.org](https://paste.yunohost.org/) + + +**Paketatutako bertsioa:** 0.1.2023.09.21~ynh2 + +**Demoa:** + +## Pantaila-argazkiak + +![Haste(r)en pantaila-argazkia](./doc/screenshots/screenshot.png) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/haste_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/haste_ynh/tree/testing --debug +edo +sudo yunohost app upgrade haste -u https://github.com/YunoHost-Apps/haste_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index f461914..b1c2c10 100644 --- a/README_fr.md +++ b/README_fr.md @@ -31,7 +31,7 @@ Haste est un logiciel pastebin open-source écrit en node.js, facilement install - Site officiel de l’app : - Documentation officielle utilisateur : -- Dépôt de code officiel de l’app : +- Dépôt de code officiel de l’app : - YunoHost Store : - Signaler un bug : diff --git a/README_gl.md b/README_gl.md index bb59b0e..2f4ca94 100644 --- a/README_gl.md +++ b/README_gl.md @@ -31,7 +31,7 @@ Haste is an open-source pastebin software written in node.js, which is easily in - Web oficial da app: - Documentación oficial para usuarias: -- Repositorio de orixe do código: +- Repositorio de orixe do código: - Tenda YunoHost: - Informar dun problema: diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..bae40b2 --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,50 @@ + + +# YunoHost 上的 Haste + +[![集成程度](https://dash.yunohost.org/integration/haste.svg)](https://dash.yunohost.org/appci/app/haste) ![工作状态](https://ci-apps.yunohost.org/ci/badges/haste.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/haste.maintain.svg) + +[![使用 YunoHost 安装 Haste](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=haste) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Haste。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +Haste is an open-source pastebin software written in node.js, which is easily installable in any network. YunoHost Project uses Haste as pastebin for log sharing: [paste.yunohost.org](https://paste.yunohost.org/) + + +**分发版本:** 0.1.2023.09.21~ynh2 + +**演示:** + +## 截图 + +![Haste 的截图](./doc/screenshots/screenshot.png) + +## 文档与资源 + +- 官方应用网站: +- 官方用户文档: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/haste_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/haste_ynh/tree/testing --debug +或 +sudo yunohost app upgrade haste -u https://github.com/YunoHost-Apps/haste_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** diff --git a/manifest.toml b/manifest.toml index aa2fdab..4e3b7c1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -14,7 +14,7 @@ license = "MIT" website = "http://hastebin.com/" demo = "http://hastebin.com/" userdoc = "https://hastebin.com/about.md" -code = "https://github.com/seejohnrun/haste-server" +code = "https://github.com/toptal/haste-server" [integration] yunohost = ">= 11.2" @@ -41,8 +41,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/seejohnrun/haste-server/archive/ded18b0c2e1ad05eaba6ab5bb938ae6b54cb5147.tar.gz" - sha256 = "2f4ac83e9fe2f78b4b48d3999cfbc879ed29fd15d5c1d21c316ef66ddfde89f1" + url = "https://github.com/toptal/haste-server/archive/87a6a88449db1e1e048bf58223038b8df83846c8.tar.gz" + sha256 = "729cdff777daa04ccc277670a94e2e8e5d7bf4cd1bf63730d3436bca5d05dd6d" autoupdate.strategy = "latest_github_commit" autoupdate.force_version = "0.1.%Y.%m.%d" diff --git a/scripts/backup b/scripts/backup index d45b6dc..a8196c4 100755 --- a/scripts/backup +++ b/scripts/backup @@ -21,18 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" -#================================================= -# BACKUP THE NGINX CONFIGURATION -#================================================= - -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" - -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup --src_path="/etc/logrotate.d/$app" - #================================================= # BACKUP DATA_DIR DIRECTORY #================================================= @@ -40,15 +28,15 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="$data_dir" --is_big #================================================= -# BACKUP BINARY +# SYSTEM CONFIGURATION #================================================= +ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +ynh_backup --src_path="/etc/logrotate.d/$app" + ynh_backup --src_path="/usr/bin/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/remove b/scripts/remove index 9434ca3..17c3382 100755 --- 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/restore b/scripts/restore index 2dccb71..d1a23dc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -58,12 +58,12 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -yunohost service add $app --description="Haste is a pastebin software" --log="/var/log/$app/$app.log" +ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet -ynh_restore_file --origin_path="/etc/logrotate.d/$app" +yunohost service add $app --description="Haste is a pastebin software" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 45bdbce..126e5fd 100755 --- 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) - #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -25,14 +19,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=7 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=7 - - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$install_dir" --keep="config.js" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep="config.js" #================================================= # UPGRADE NODEJS