From 869473d04d48e7772b6b3514115dacbd44cd4e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:30:35 +0200 Subject: [PATCH] Testing (#22) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Cleaning up (#9) * Update README_fr.md * cleaning up * Fix package_checker warning * permission rework * From source * Update app.src * fix * fix * Set SVG badge * Update README_fr.md * Small fix * Small fixes * Cleaning up * Update manifest.json * Update change_url * Update manifest.json * Update upgrade * Add user * Fix * fix * Update install * Fix * [autopatch] Update issue and PR templates (#16) * Testing (#13) - Set permissions * [autopatch] Update issue and PR templates (#15) Co-authored-by: Yunohost-Bot <> * [autopatch] Update issue and PR templates Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> * Update manifest.json * Update check_process * Update restore * Cleaning up * Auto-update README * Auto-update README * Update manifest.json * Auto-update README * update to 4.3 * Update manifest.json * Auto-update README * Update manifest.json * Auto-update README * Auto-update README * Update manifest.json * Update manifest.json * Auto-update README * V2 (#20) * v2 * Auto-update README * V2 * Auto-update README * Fix * Auto-update README * Auto-update README * Create description.md * Update manifest.toml * Auto-update README * Update install --------- Co-authored-by: yunohost-bot * Delete description.md * Create DESCRIPTION.md * Auto-update README * Fix * Auto-update README * src * Update manifest.toml * Auto-update README --------- Co-authored-by: YunoHost Bot Co-authored-by: Yunohost-Bot <> Co-authored-by: yunohost-bot --- README.md | 3 +- README_fr.md | 3 +- conf/app.src | 5 --- manifest.toml | 16 +++++++--- scripts/change_url | 77 +--------------------------------------------- 5 files changed, 17 insertions(+), 87 deletions(-) delete mode 100644 conf/app.src diff --git a/README.md b/README.md index ab0cb45..4a87676 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # 20 euros for YunoHost [![Integration level](https://dash.yunohost.org/integration/20euros.svg)](https://dash.yunohost.org/appci/app/20euros) ![Working status](https://ci-apps.yunohost.org/ci/badges/20euros.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/20euros.maintain.svg) + [![Install 20 euros with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=20euros) *[Lire ce readme en français.](./README_fr.md)* @@ -17,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Variante de 2048 avec pièces et billets en euros. -**Shipped version:** 1.0~ynh8 +**Shipped version:** 1.0~ynh9 ## Screenshots diff --git a/README_fr.md b/README_fr.md index 078c299..e7ffe85 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # 20 euros pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/20euros.svg)](https://dash.yunohost.org/appci/app/20euros) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/20euros.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/20euros.maintain.svg) + [![Installer 20 euros avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=20euros) *[Read this readme in english.](./README.md)* @@ -17,7 +18,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Variante de 2048 avec pièces et billets en euros. -**Version incluse :** 1.0~ynh8 +**Version incluse :** 1.0~ynh9 ## Captures d’écran diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 3962b8b..0000000 --- a/conf/app.src +++ /dev/null @@ -1,5 +0,0 @@ -SOURCE_URL=https://github.com/jatekos101/20euros/archive/v0.1.zip -SOURCE_SUM=79e743f874eef952e8e0ca5f7a48d04872d7671a9c0581ce188fc42ee11bdf72 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=zip -SOURCE_IN_SUBDIR=true diff --git a/manifest.toml b/manifest.toml index 640781c..79063a6 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "20 euros" description.en = "2048 variant with Euro coins and notes" description.fr = "Variante de 2048 avec pièces et billets en euros" -version = "1.0~ynh8" +version = "1.0~ynh9" maintainers = ["eric_G"] @@ -14,11 +14,11 @@ license = "MIT" code = "https://github.com/jatekos101/20euros" [integration] -yunohost = ">= 11.1.2" +yunohost = ">= 11.1.16" architectures = "all" multi_instance = true -ldap = "not_relevant" -sso = "not_relevant" +ldap = false +sso = true disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -38,6 +38,14 @@ ram.runtime = "50M" default = "visitors" [resources] + + [resources.sources] + + [resources.sources.main] + url = "https://github.com/jatekos101/20euros/archive/v0.1.zip" + sha256 = "79e743f874eef952e8e0ca5f7a48d04872d7671a9c0581ce188fc42ee11bdf72" + autoupdate.strategy = "latest_github_tag" + [resources.system_user] [resources.install_dir] diff --git a/scripts/change_url b/scripts/change_url index 183c971..f96dd50 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -7,88 +7,13 @@ #================================================= source /usr/share/yunohost/helpers -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN -old_path=$YNH_APP_OLD_PATH - -new_domain=$YNH_APP_NEW_DOMAIN -new_path=$YNH_APP_NEW_PATH - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=2 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 -if [ "$old_path" != "$new_path" ] -then - change_path=1 -fi #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3 -nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf - -# Change the path in the NGINX config file -if [ $change_path -eq 1 ] -then - # Make a backup of the original NGINX config file if modified - ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for NGINX helper - domain="$old_domain" - path_url="$new_path" - # Create a dedicated NGINX config - ynh_add_nginx_config -fi - -# Change the domain for NGINX -if [ $change_domain -eq 1 ] -then - # Delete file checksum for the old conf file location - ynh_delete_file_checksum --file="$nginx_conf_path" - mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf - # Store file checksum for the new config file location - ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # RELOAD NGINX