diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b25c15b..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/README.md b/README.md index aca88fd..1e9b574 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Hextris for YunoHost -[![Integration level](https://dash.yunohost.org/integration/hextris.svg)](https://dash.yunohost.org/appci/app/hextris) ![](https://ci-apps.yunohost.org/ci/badges/hextris.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/hextris.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/hextris.svg)](https://dash.yunohost.org/appci/app/hextris) ![Working status](https://ci-apps.yunohost.org/ci/badges/hextris.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/hextris.maintain.svg) [![Install Hextris with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=hextris) *[Lire ce readme en français.](./README_fr.md)* @@ -15,34 +15,40 @@ 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/ ## Screenshots -![](./doc/screenshots/screenshot.jpg) +![Screenshot of Hextris](./doc/screenshots/screenshot.jpg) ## Documentation and resources -* Official app website: http://hextris.github.io/ -* Upstream app code repository: https://github.com/Hextris/Hextris -* YunoHost documentation for this app: https://yunohost.org/app_hextris -* Report a bug: https://github.com/YunoHost-Apps/hextris_ynh/issues +* Official app website: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/hextris_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/hextris_ynh/tree/testing --debug or sudo yunohost app upgrade hextris -u https://github.com/YunoHost-Apps/hextris_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 5596e2b..f528f84 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,44 +1,54 @@ + + # Hextris pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/hextris.svg)](https://dash.yunohost.org/appci/app/hextris) ![](https://ci-apps.yunohost.org/ci/badges/hextris.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/hextris.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/hextris.svg)](https://dash.yunohost.org/appci/app/hextris) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/hextris.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/hextris.maintain.svg) [![Installer Hextris avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=hextris) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Hextris rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## 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/ ## Captures d'écran -![](./doc/screenshots/screenshot.jpg) +![Capture d'écran de Hextris](./doc/screenshots/screenshot.jpg) ## Documentations et ressources -* Site officiel de l'app : http://hextris.github.io/ -* Dépôt de code officiel de l'app : https://github.com/Hextris/Hextris -* Documentation YunoHost pour cette app : https://yunohost.org/app_hextris -* Signaler un bug : https://github.com/YunoHost-Apps/hextris_ynh/issues +* Site officiel de l'app : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/hextris_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/hextris_ynh/tree/testing --debug ou sudo yunohost app upgrade hextris -u https://github.com/YunoHost-Apps/hextris_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** diff --git a/check_process b/check_process index 7de0578..0db9b4f 100644 --- a/check_process +++ b/check_process @@ -11,8 +11,8 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=6f4c1e5f81bea341c07e199c4916fc31b54eaf61 - upgrade=1 from_commit=ec4da0af3abbd7b8bd59d5f7d9d7c594ae844ac0 + # 2020.05.05~ynh4 + upgrade=1 from_commit=bfdb624f86329cb5095cb3a343fc54e84d001c70 backup_restore=1 multi_instance=1 port_already_use=0 @@ -21,8 +21,5 @@ Email= Notification=none ;;; Upgrade options - ; commit=6f4c1e5f81bea341c07e199c4916fc31b54eaf61 - name=Global refactoring - manifest_arg=domain=DOMAIN&path=PATH&is_public=1& - ; commit=ec4da0af3abbd7b8bd59d5f7d9d7c594ae844ac0 + ; commit=bfdb624f86329cb5095cb3a343fc54e84d001c70 name=1.1-ynh3 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/conf/nginx.conf b/conf/nginx.conf index 549ae0e..864573c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,12 +2,7 @@ location __PATH__/ { # Path to source - alias __FINALPATH__/ ; - - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + alias __FINALPATH__/; index index.html; 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 4bc6a63..f66079d 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "hextris", "packaging_format": 1, "description": { - "en": "A fast paced puzzle game", - "fr": "Un jeu de puzzle très rapide" + "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", @@ -20,14 +20,14 @@ "email": "aeris@e.email" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "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 #=================================================