From 70c849f0a91c2a0bcbae96c9c0180fa7dad6b84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 13 Aug 2020 18:08:23 +0200 Subject: [PATCH 01/14] Cleaning up (#13) * Update README.md * Update README_fr.md * cleaning up --- README.md | 5 ++--- README_fr.md | 5 ++--- check_process | 4 ++-- manifest.json | 16 ++++++++-------- pull_request_template.md | 2 +- scripts/backup | 1 - scripts/change_url | 14 +++++++------- scripts/install | 6 +++--- scripts/remove | 6 +++--- scripts/restore | 4 ++-- scripts/upgrade | 8 ++++---- 11 files changed, 34 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 727f714..d821291 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cubiks-2048 for YunoHost +# Cubiks 2048 for YunoHost [![Integration level](https://dash.yunohost.org/integration/cubiks2048.svg)](https://dash.yunohost.org/appci/app/cubiks2048) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.maintain.svg) [![Install Cubiks-2048 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cubiks-2048) @@ -33,8 +33,7 @@ Clone of 2048 game in 3D --- -Developers info ----------------- +## Developers info Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/Cubiks-2048_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md index 2d862ff..94108fc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,4 +1,4 @@ -# Cubiks-2048 pour YunoHost +# Cubiks 2048 pour YunoHost [![Integration level](https://dash.yunohost.org/integration/cubiks2048.svg)](https://dash.yunohost.org/appci/app/cubiks2048) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.maintain.svg) [![Installer Cubiks-2048 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cubiks-2048) @@ -33,8 +33,7 @@ Clone en 3D du jeu 2048. --- -Informations pour les développeurs ----------------- +## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/Cubiks-2048_ynh/tree/testing). diff --git a/check_process b/check_process index 963a84a..88b90ef 100644 --- a/check_process +++ b/check_process @@ -2,8 +2,8 @@ auto_remove=1 ; Manifest domain="domain.tld" (DOMAIN) - path="/path" (PATH) - is_public="Yes" (PUBLIC|public=Yes|private=No) + path="/path" (PATH) + is_public="Yes" (PUBLIC|public=Yes|private=No) ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index 3b65e7d..5f3f36a 100644 --- a/manifest.json +++ b/manifest.json @@ -26,8 +26,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain for Cubiks-2048", - "fr": "Choisissez un nom de domaine pour Cubiks-2048" + "en": "Choose a domain for Cubiks 2048", + "fr": "Choisissez un nom de domaine pour Cubiks 2048" }, "example": "domain.org" }, @@ -35,11 +35,11 @@ "name": "path", "type": "path", "ask": { - "en": "Choose a path for Cubiks-2048", - "fr": "Choisissez un chemin pour Cubiks-2048" + "en": "Choose a path for Cubiks 2048", + "fr": "Choisissez un chemin pour Cubiks 2048" }, - "example": "/cubiks2048", - "default": "/cubiks2048" + "example": "/cubiks-2048", + "default": "/cubiks-2048" }, { "name": "is_public", @@ -49,8 +49,8 @@ "fr": "Est-ce un jeu public ?" }, "help": { - "en": "If enabled, Cubiks-2048 will be accessible by people who doesn’t have an account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, Cubiks-2048 sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + "en": "If enabled, Cubiks 2048 will be accessible by people who doesn’t have an account. This can be changed later via the webadmin.", + "fr": "Si cette case est cochée, Cubiks 2048 sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true } diff --git a/pull_request_template.md b/pull_request_template.md index 40345ea..c8f7bc8 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -15,4 +15,4 @@ --- *If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/cubiks2048_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/cubiks2048_ynh%20PR-NUM-%20(USERNAME)/) +[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/cubiks-2048_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/cubiks-2048_ynh%20PR-NUM-%20(USERNAME)/) diff --git a/scripts/backup b/scripts/backup index 19505c8..139eacc 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source /usr/share/yunohost/helpers #================================================= diff --git a/scripts/change_url b/scripts/change_url index 7fcf700..5ce6932 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -34,7 +34,7 @@ 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 +ynh_script_progression --message="Backing up $app before changing its url (may take a while)..." --weight=2 # Backup the current version of the app ynh_backup_before_upgrade @@ -67,23 +67,23 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating Nginx web server configuration..." --weight=3 +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 +# 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 + # 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 + # Create a dedicated NGINX config ynh_add_nginx_config fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -96,7 +96,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading Nginx web server..." --weight=2 +ynh_script_progression --message="Reloading NGINX web server..." --weight=2 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index c560a3e..a5d8867 100755 --- a/scripts/install +++ b/scripts/install @@ -62,9 +62,9 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring Nginx web server..." --weight=2 +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -87,7 +87,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1 #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading Nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 2c06727..2123569 100755 --- a/scripts/remove +++ b/scripts/remove @@ -23,7 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=3 +ynh_script_progression --message="Removing $app main directory..." --weight=3 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -31,9 +31,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing Nginx web server configuration..." --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 61703fb..c2896b5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -47,7 +47,7 @@ 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=2 +ynh_script_progression --message="Restoring $app main directory..." --weight=2 ynh_restore_file --origin_path="$final_path" @@ -71,7 +71,7 @@ chown -R root: $final_path #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=3 +ynh_script_progression --message="Reloading NGINX web server..." --weight=3 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index a252a5a..993d052 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,7 +49,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3 +ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=3 # Backup the current version of the app ynh_backup_before_upgrade @@ -81,9 +81,9 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -104,7 +104,7 @@ ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload From 530653f9e441aec4ca28cdecd4eef0bf80010418 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 17 Nov 2020 10:50:23 +0100 Subject: [PATCH 02/14] Fix check_process warnings --- check_process | 10 ---------- manifest.json | 4 ++-- scripts/backup | 5 +++++ scripts/install | 2 +- scripts/restore | 1 - scripts/upgrade | 8 -------- 6 files changed, 8 insertions(+), 22 deletions(-) diff --git a/check_process b/check_process index 88b90ef..1e8a280 100644 --- a/check_process +++ b/check_process @@ -14,18 +14,8 @@ upgrade=1 backup_restore=1 multi_instance=1 - incorrect_path=1 port_already_use=0 change_url=1 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=0 Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 \ No newline at end of file diff --git a/manifest.json b/manifest.json index 78473cc..3c7a127 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "2048 game clone in 3D", "fr": "Clone du jeu 2048 en 3D" }, - "version": "1.0~ynh2", + "version": "1.0~ynh3", "url": "https://github.com/Kshitij-Banerjee/Cubiks-2048/", "license": "MIT", "maintainer": { @@ -14,7 +14,7 @@ "email": "ericgaspar@free.fr" }, "requirements": { - "yunohost": ">= 3.7.0" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 139eacc..3b1eda7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -25,6 +25,11 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) +#================================================= +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP THE APP MAIN DIR #================================================= diff --git a/scripts/install b/scripts/install index a5d8867..66cfb29 100755 --- a/scripts/install +++ b/scripts/install @@ -82,7 +82,7 @@ chown -R root: $final_path ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" +[ $is_public -eq 1 ] || ynh_permission_update --permission "main" --add "visitors" #================================================= # RELOAD NGINX diff --git a/scripts/restore b/scripts/restore index c2896b5..7680bdd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -# Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 993d052..10a7628 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -93,14 +93,6 @@ ynh_add_nginx_config # Set permissions on app files chown -R root: $final_path -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" - #================================================= # RELOAD NGINX #================================================= From a28d326d342b96040a7a98769b71c5d416282dd6 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 18 Nov 2020 23:21:06 +0100 Subject: [PATCH 03/14] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 66cfb29..a5d8867 100755 --- a/scripts/install +++ b/scripts/install @@ -82,7 +82,7 @@ chown -R root: $final_path ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary or protect it -[ $is_public -eq 1 ] || ynh_permission_update --permission "main" --add "visitors" +[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" #================================================= # RELOAD NGINX From 5bab0e2b1dc86862b155d9afe3bda1840998309b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 17 Dec 2020 21:06:56 +0100 Subject: [PATCH 04/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3404f3f..269248e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Cubiks 2048 for YunoHost [![Integration level](https://dash.yunohost.org/integration/cubiks-2048.svg)](https://dash.yunohost.org/appci/app/cubiks-2048) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.maintain.svg) -[![Install Cubiks-2048 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cubiks-2048) +[![Install Cubiks-2048 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cubiks-2048) *[Lire ce readme en français.](./README_fr.md)* From 4e5fbf54c1d9ea7d2bcc179006e04a44139d89fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 26 Dec 2020 22:53:25 +0100 Subject: [PATCH 05/14] Set SVG badge --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index e3d45a7..f45a0ea 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Cubiks 2048 pour YunoHost [![Integration level](https://dash.yunohost.org/integration/cubiks-2048.svg)](https://dash.yunohost.org/appci/app/cubiks-2048) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.maintain.svg) -[![Installer Cubiks-2048 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=cubiks-2048) +[![Installer Cubiks-2048 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cubiks-2048) *[Read this readme in english.](./README.md)* From e291cdeee375e7974ebd57dfb285c4fd6b3d5c13 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 25 Jan 2021 23:59:07 +0100 Subject: [PATCH 06/14] Small fixes --- README.md | 4 ++-- README_fr.md | 4 ++-- manifest.json | 4 ++-- pull_request_template.md | 4 +--- scripts/install | 6 +++--- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 269248e..d55cece 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Cubiks 2048 for YunoHost [![Integration level](https://dash.yunohost.org/integration/cubiks-2048.svg)](https://dash.yunohost.org/appci/app/cubiks-2048) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.maintain.svg) -[![Install Cubiks-2048 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cubiks-2048) +[![Install Cubiks 2048 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cubiks-2048) *[Lire ce readme en français.](./README_fr.md)* -> *This package allow you to install Cubiks-2048 quickly and simply on a YunoHost server. +> *This package allow you to install Cubiks 2048 quickly and simply on a YunoHost server. If you don’t have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Overview diff --git a/README_fr.md b/README_fr.md index f45a0ea..cdc4098 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,11 +1,11 @@ # Cubiks 2048 pour YunoHost [![Integration level](https://dash.yunohost.org/integration/cubiks-2048.svg)](https://dash.yunohost.org/appci/app/cubiks-2048) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/cubiks-2048.maintain.svg) -[![Installer Cubiks-2048 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cubiks-2048) +[![Installer Cubiks 2048 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cubiks-2048) *[Read this readme in english.](./README.md)* -> *This package allow you to install Cubiks-2048 quickly and simply on a YunoHost server. +> *This package allow you to install Cubiks 2048 quickly and simply on a YunoHost server. If you don’t have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Vue d’ensemble diff --git a/manifest.json b/manifest.json index c0d5574..d1ac0aa 100644 --- a/manifest.json +++ b/manifest.json @@ -6,12 +6,12 @@ "en": "2048 game clone in 3D", "fr": "Clone du jeu 2048 en 3D" }, - "version": "1.0~ynh3", + "version": "1.0~ynh4", "url": "https://github.com/Kshitij-Banerjee/Cubiks-2048/", "license": "MIT", "maintainer": { "name": "eric_G", - "email": "ericgaspar@free.fr" + "email": "" }, "requirements": { "yunohost": ">= 4.0.0" diff --git a/pull_request_template.md b/pull_request_template.md index c8f7bc8..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/cubiks-2048_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/cubiks-2048_ynh%20PR-NUM-%20(USERNAME)/) +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/install b/scripts/install index fdf4e48..702eff3 100755 --- a/scripts/install +++ b/scripts/install @@ -43,8 +43,8 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= ynh_script_progression --message="Storing installation settings..." --weight=2 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= @@ -82,7 +82,7 @@ chown -R root: $final_path ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" +[ $is_public -eq 0 ] || ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX From f918cb86a210d09af50438154d1efb315c9c124c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Mar 2021 23:35:19 +0100 Subject: [PATCH 07/14] Remove is_public --- scripts/install | 3 +-- scripts/upgrade | 17 +++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/scripts/install b/scripts/install index 702eff3..3562d6a 100755 --- a/scripts/install +++ b/scripts/install @@ -45,7 +45,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # STANDARD MODIFICATIONS @@ -79,7 +78,7 @@ chown -R root: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary or protect it [ $is_public -eq 0 ] || ynh_permission_update --permission="main" --add="visitors" diff --git a/scripts/upgrade b/scripts/upgrade index 8dbc35e..2ef3a47 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -31,21 +30,19 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= From 22d2a51ba0ccd0cbb860f59a376d9e2f32658135 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 09:02:17 +0100 Subject: [PATCH 08/14] Update manifest.json --- manifest.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index d1ac0aa..39d0a74 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -25,29 +25,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Cubiks 2048", - "fr": "Choisissez un nom de domaine pour Cubiks 2048" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Cubiks 2048", - "fr": "Choisissez un chemin pour Cubiks 2048" - }, "example": "/cubiks-2048", "default": "/cubiks-2048" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public game?", - "fr": "Est-ce un jeu public ?" - }, "help": { "en": "If enabled, Cubiks 2048 will be accessible by people who doesn’t have an account. This can be changed later via the webadmin.", "fr": "Si cette case est cochée, Cubiks 2048 sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." From 411e6379e86a88f8ba227052dc3450b0b13a3248 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 10:02:33 +0100 Subject: [PATCH 09/14] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 39d0a74..0871e45 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "2048 game clone in 3D", "fr": "Clone du jeu 2048 en 3D" }, - "version": "1.0~ynh4", + "version": "1.0~ynh5", "url": "https://github.com/Kshitij-Banerjee/Cubiks-2048/", "license": "MIT", "maintainer": { From 6dd17cafaa0675ecc0381df512402a0af1aafe8c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 23 Apr 2021 08:03:58 +0200 Subject: [PATCH 10/14] Fix --- README.md | 4 ++-- README_fr.md | 4 ++-- scripts/install | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d55cece..1f4c174 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ Clone of 2048 game in 3D #### Supported architectures -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cubiks-2048%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/cubiks-2048/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cubiks-2048%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cubiks-2048/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cubiks-2048.svg)](https://ci-apps.yunohost.org/ci/apps/cubiks-2048/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cubiks-2048.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cubiks-2048/) ## Links diff --git a/README_fr.md b/README_fr.md index cdc4098..cc5bd1a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,8 +22,8 @@ Clone en 3D du jeu 2048. #### Architectures supportées -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cubiks-2048%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/cubiks-2048/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cubiks-2048%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cubiks-2048/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/cubiks-2048.svg)](https://ci-apps.yunohost.org/ci/apps/cubiks-2048/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/cubiks-2048.svg)](https://ci-apps-arm.yunohost.org/ci/apps/cubiks-2048/) ## Liens diff --git a/scripts/install b/scripts/install index 3562d6a..d64b57b 100755 --- a/scripts/install +++ b/scripts/install @@ -43,8 +43,8 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= ynh_script_progression --message="Storing installation settings..." --weight=2 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # STANDARD MODIFICATIONS From fe52522e541c5fb057c863e21a26d0d31e0b6ab9 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Tue, 11 May 2021 07:28:45 +0200 Subject: [PATCH 11/14] [autopatch] Update issue and PR templates (#17) Co-authored-by: Yunohost-Bot <> --- pull_request_template.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* From b4212fde7adcf089f67ff7123d7d1e57bdc28bb1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 09:56:06 +0200 Subject: [PATCH 12/14] Add templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) From 33c7a99f31009b74fea3e2b06bf67c0dd7798468 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 09:56:39 +0200 Subject: [PATCH 13/14] Add screenshot --- .../screenshots/Screenshot-Cubiks-2048.jpg | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename Screenshot-Cubiks-2048.jpg => doc/screenshots/Screenshot-Cubiks-2048.jpg (100%) diff --git a/Screenshot-Cubiks-2048.jpg b/doc/screenshots/Screenshot-Cubiks-2048.jpg similarity index 100% rename from Screenshot-Cubiks-2048.jpg rename to doc/screenshots/Screenshot-Cubiks-2048.jpg From a3fc0d1957f4c155ff5d3b63e8cc86bfdecd5ae2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 11 May 2021 13:09:06 +0200 Subject: [PATCH 14/14] Fix --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1f4c174..231d500 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ *[Lire ce readme en français.](./README_fr.md)* > *This package allow you to install Cubiks 2048 quickly and simply on a YunoHost server. -If you don’t have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +If you don’t have YunoHost, please see [here](https://yunohost.org/install) to know how to install and enjoy it.* ## Overview diff --git a/README_fr.md b/README_fr.md index cc5bd1a..1392cb1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,7 +6,7 @@ *[Read this readme in english.](./README.md)* > *This package allow you to install Cubiks 2048 quickly and simply on a YunoHost server. -If you don’t have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +If you don’t have YunoHost, please see [here](https://yunohost.org/install) to know how to install and enjoy it.* ## Vue d’ensemble