From bec720c2d26e7e86b45e153b4c7f1b9b6c28f83c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 16 Oct 2022 21:36:48 +0200 Subject: [PATCH 1/2] Appy last example_ynh --- .gitignore | 1 - check_process | 1 + conf/app.src | 1 + doc/DESCRIPTION.md | 10 +++++++--- doc/DESCRIPTION_fr.md | 7 +++++++ doc/DISCLAIMER.md | 0 doc/DISCLAIMER_fr.md | 0 manifest.json | 4 ++-- scripts/_common.sh | 1 - scripts/backup | 7 +++++-- scripts/change_url | 4 ++-- scripts/install | 11 +++++++++-- scripts/remove | 2 +- scripts/restore | 21 +++++++++++++-------- scripts/upgrade | 10 ++++++---- 15 files changed, 54 insertions(+), 26 deletions(-) delete mode 100644 .gitignore create mode 100644 doc/DESCRIPTION_fr.md create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b25c15b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/check_process b/check_process index 489a614..0db9b4f 100644 --- a/check_process +++ b/check_process @@ -11,6 +11,7 @@ setup_private=1 setup_public=1 upgrade=1 + # 2020.05.05~ynh4 upgrade=1 from_commit=bfdb624f86329cb5095cb3a343fc54e84d001c70 backup_restore=1 multi_instance=1 diff --git a/conf/app.src b/conf/app.src index 2a00faf..e316fcc 100644 --- a/conf/app.src +++ b/conf/app.src @@ -4,3 +4,4 @@ SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= +SOURCE_EXTRACT=true diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 21110f5..106c5fb 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,3 +1,7 @@ -Rotate the Hexagon to prevent the blocks from stacking outside the outer grey hexagon! - -HEXTRIS is a fast paced puzzle game inspired by Tetris. Blocks start on the edges of the screen, and fall towards the inner blue hexagon. The objective of the game is to prevent the blocks from stacking outside the area of the grey hexagon. To do this, you must rotate the hexagon to manage different stacks of blocks on each face. Aim to connect 3 or more blocks of the same color: when 3 or more blocks of the same color touch each other, they are destroyed, and the blocks above them slide down! Destroying multiple series of blocks grants combos, whose durations are indicated by a quickly receding outline around the outer, grey hexagon. You lose once blocks on a face of the hexagon stack outside of the outer hexagon! \ No newline at end of file +HEXTRIS is a fast paced puzzle game inspired by Tetris. +Blocks start on the edges of the screen, and fall towards the inner blue hexagon. +The objective of the game is to prevent the blocks from stacking outside the area of the grey hexagon. +To do this, you must rotate the hexagon to manage different stacks of blocks on each face. +Aim to connect 3 or more blocks of the same color: when 3 or more blocks of the same color touch each other, they are destroyed, and the blocks above them slide down! +Destroying multiple series of blocks grants combos, whose durations are indicated by a quickly receding outline around the outer, grey hexagon. +You lose once blocks on a face of the hexagon stack outside of the outer hexagon! diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md new file mode 100644 index 0000000..ac63989 --- /dev/null +++ b/doc/DESCRIPTION_fr.md @@ -0,0 +1,7 @@ +HEXTRIS est un jeu de puzzle au rythme rapide inspiré de Tetris. +Les blocs commencent sur les bords de l'écran, et tombent vers l'hexagone bleu intérieur. +Le but du jeu est d'empêcher les blocs de s'empiler en dehors de la zone de l'hexagone gris. +Pour ce faire, vous devez faire tourner l'hexagone pour gérer différentes piles de blocs sur chaque face. +Visez à relier 3 blocs ou plus de la même couleur : lorsque 3 blocs ou plus de la même couleur se touchent, ils sont détruits, et les blocs au-dessus d'eux glissent vers le bas ! +Détruire plusieurs séries de blocs permet d'obtenir des combos, dont la durée est indiquée par un contour qui s'estompe rapidement autour de l'hexagone extérieur gris. +Vous perdez une fois les blocs sur une face de la pile hexagonale en dehors de l'hexagone extérieur ! diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..e69de29 diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..e69de29 diff --git a/manifest.json b/manifest.json index f42e19d..f66079d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Fast paced puzzle game", "fr": "Jeu de puzzle très rapide" }, - "version": "2020.05.05~ynh4", + "version": "2020.05.05~ynh5", "url": "http://hextris.github.io/", "upstream": { "license": "GPL-3.0", @@ -27,7 +27,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" diff --git a/scripts/_common.sh b/scripts/_common.sh index f1a0166..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -15,4 +15,3 @@ #================================================= # FUTURE OFFICIAL HELPERS #================================================= - diff --git a/scripts/backup b/scripts/backup index 87e89d3..aaefe2e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -14,13 +14,16 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info --message="Loading installation settings..." +ynh_print_info --message="Loading settings..." app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/change_url b/scripts/change_url index 2480b7f..6328f58 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -24,13 +24,13 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 diff --git a/scripts/install b/scripts/install index 330c567..13e6a6f 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,9 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -45,6 +48,8 @@ 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 +#================================================= +# STANDARD MODIFICATIONS #================================================= # CREATE DEDICATED USER #================================================= @@ -53,8 +58,6 @@ ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user ynh_system_user_create --username=$app --home_dir="$final_path" -#================================================= -# STANDARD MODIFICATIONS #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -76,6 +79,8 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# GENERIC FINALIZATION #================================================= # SETUP SSOWAT #================================================= @@ -84,6 +89,8 @@ ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then + # Everyone can access the app. + # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi diff --git a/scripts/remove b/scripts/remove index 9279214..29edd33 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/restore b/scripts/restore index b4c4d93..27da975 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -14,6 +14,9 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -38,13 +41,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -64,6 +60,15 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# SPECIFIC RESTORATION +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index c1c02aa..bc95775 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 +ynh_script_progression --message="Loading settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -34,12 +34,14 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# STANDARD UPGRADE STEPS #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -66,8 +68,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" -#================================================= -# STANDARD UPGRADE STEPS #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -92,6 +92,8 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# GENERIC FINALIZATION #================================================= # RELOAD NGINX #================================================= From 707c95f03a10a4cb7b97798963797c3b83dc8cc4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 16 Oct 2022 19:36:53 +0000 Subject: [PATCH 2/2] Auto-update README --- README.md | 11 ++++++++--- README_fr.md | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 943be27..1e9b574 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,16 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Rotate the Hexagon to prevent the blocks from stacking outside the outer grey hexagon! +HEXTRIS is a fast paced puzzle game inspired by Tetris. +Blocks start on the edges of the screen, and fall towards the inner blue hexagon. +The objective of the game is to prevent the blocks from stacking outside the area of the grey hexagon. +To do this, you must rotate the hexagon to manage different stacks of blocks on each face. +Aim to connect 3 or more blocks of the same color: when 3 or more blocks of the same color touch each other, they are destroyed, and the blocks above them slide down! +Destroying multiple series of blocks grants combos, whose durations are indicated by a quickly receding outline around the outer, grey hexagon. +You lose once blocks on a face of the hexagon stack outside of the outer hexagon! -HEXTRIS is a fast paced puzzle game inspired by Tetris. Blocks start on the edges of the screen, and fall towards the inner blue hexagon. The objective of the game is to prevent the blocks from stacking outside the area of the grey hexagon. To do this, you must rotate the hexagon to manage different stacks of blocks on each face. Aim to connect 3 or more blocks of the same color: when 3 or more blocks of the same color touch each other, they are destroyed, and the blocks above them slide down! Destroying multiple series of blocks grants combos, whose durations are indicated by a quickly receding outline around the outer, grey hexagon. You lose once blocks on a face of the hexagon stack outside of the outer hexagon! -**Shipped version:** 2020.05.05~ynh4 +**Shipped version:** 2020.05.05~ynh5 **Demo:** https://hextris.io/ diff --git a/README_fr.md b/README_fr.md index daba555..f528f84 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,11 +15,16 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Rotate the Hexagon to prevent the blocks from stacking outside the outer grey hexagon! +HEXTRIS est un jeu de puzzle au rythme rapide inspiré de Tetris. +Les blocs commencent sur les bords de l'écran, et tombent vers l'hexagone bleu intérieur. +Le but du jeu est d'empêcher les blocs de s'empiler en dehors de la zone de l'hexagone gris. +Pour ce faire, vous devez faire tourner l'hexagone pour gérer différentes piles de blocs sur chaque face. +Visez à relier 3 blocs ou plus de la même couleur : lorsque 3 blocs ou plus de la même couleur se touchent, ils sont détruits, et les blocs au-dessus d'eux glissent vers le bas ! +Détruire plusieurs séries de blocs permet d'obtenir des combos, dont la durée est indiquée par un contour qui s'estompe rapidement autour de l'hexagone extérieur gris. +Vous perdez une fois les blocs sur une face de la pile hexagonale en dehors de l'hexagone extérieur ! -HEXTRIS is a fast paced puzzle game inspired by Tetris. Blocks start on the edges of the screen, and fall towards the inner blue hexagon. The objective of the game is to prevent the blocks from stacking outside the area of the grey hexagon. To do this, you must rotate the hexagon to manage different stacks of blocks on each face. Aim to connect 3 or more blocks of the same color: when 3 or more blocks of the same color touch each other, they are destroyed, and the blocks above them slide down! Destroying multiple series of blocks grants combos, whose durations are indicated by a quickly receding outline around the outer, grey hexagon. You lose once blocks on a face of the hexagon stack outside of the outer hexagon! -**Version incluse :** 2020.05.05~ynh4 +**Version incluse :** 2020.05.05~ynh5 **Démo :** https://hextris.io/