mirror of
https://github.com/YunoHost-Apps/hextris_ynh.git
synced 2024-09-03 19:16:05 +02:00
Nouvelle version stable
This commit is contained in:
commit
543017a03f
7 changed files with 46 additions and 44 deletions
14
README.md
14
README.md
|
@ -1,7 +1,9 @@
|
||||||
# Hextris for YunoHost
|
# 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) ![](https://ci-apps.yunohost.org/ci/badges/hextris.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/hextris.maintain.svg)
|
||||||
[![Install Hextris with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=hextris)
|
[![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)*
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
|
@ -22,10 +24,16 @@ An addictive puzzle game inspired by Tetris.
|
||||||
* [Official demo](http://hextris.io/)
|
* [Official demo](http://hextris.io/)
|
||||||
* [YunoHost demo](https://demo.yunohost.org/hextris/)
|
* [YunoHost demo](https://demo.yunohost.org/hextris/)
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
* Official documentation: https://github.com/Hextris/Hextris
|
||||||
|
* YunoHost documentation: https://yunohost.org/en/app_hextris
|
||||||
|
|
||||||
|
|
||||||
#### Supported architectures
|
#### Supported architectures
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/hextris%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/hextris/)
|
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/hextris.svg)](https://ci-apps.yunohost.org/ci/apps/hextris/)
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/hextris%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/hextris/)
|
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/hextris.svg)](https://ci-apps-arm.yunohost.org/ci/apps/hextris/)
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
|
||||||
|
|
12
README_fr.md
12
README_fr.md
|
@ -1,7 +1,7 @@
|
||||||
# Hextris pour YunoHost
|
# 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) ![](https://ci-apps.yunohost.org/ci/badges/hextris.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/hextris.maintain.svg)
|
||||||
[![Installer Hextris avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=hextris)
|
[![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)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
|
@ -22,10 +22,16 @@ Un puzzle addictif inspiré de Tetris.
|
||||||
* [Démo officielle](http://hextris.io/)
|
* [Démo officielle](http://hextris.io/)
|
||||||
* [Démo YunoHost](https://demo.yunohost.org/hextris/)
|
* [Démo YunoHost](https://demo.yunohost.org/hextris/)
|
||||||
|
|
||||||
|
## Documentation
|
||||||
|
|
||||||
|
* Documentation officielle : https://github.com/Hextris/Hextris
|
||||||
|
* Documentation YunoHost : https://yunohost.org/fr/app_hextris
|
||||||
|
|
||||||
|
|
||||||
#### Architectures supportées
|
#### Architectures supportées
|
||||||
|
|
||||||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/hextris%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/hextris/)
|
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/hextris.svg)](https://ci-apps.yunohost.org/ci/apps/hextris/)
|
||||||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/hextris%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/hextris/)
|
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/hextris.svg)](https://ci-apps-arm.yunohost.org/ci/apps/hextris/)
|
||||||
|
|
||||||
## Liens
|
## Liens
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "A fast paced puzzle game.",
|
"en": "A fast paced puzzle game.",
|
||||||
"fr": "Un jeu de puzzle très rapide"
|
"fr": "Un jeu de puzzle très rapide"
|
||||||
},
|
},
|
||||||
"version": "2020-05-05~ynh2",
|
"version": "2020-05-05~ynh3",
|
||||||
"url": "http://hextris.github.io/",
|
"url": "http://hextris.github.io/",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"email": "aeris@e.email"
|
"email": "aeris@e.email"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 3.8.1"
|
"yunohost": ">= 4.1.7"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -25,29 +25,17 @@
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a domain for Hextris",
|
|
||||||
"fr": "Choisissez un domaine pour Hextris"
|
|
||||||
},
|
|
||||||
"example": "domain.org"
|
"example": "domain.org"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
|
||||||
"en": "Choose a path for Hextris",
|
|
||||||
"fr": "Choisissez un chemin pour Hextris"
|
|
||||||
},
|
|
||||||
"example": "/hextris",
|
"example": "/hextris",
|
||||||
"default": "/hextris"
|
"default": "/hextris"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
|
||||||
"en": "Is it a public application?",
|
|
||||||
"fr": "Est-ce une application publique ?"
|
|
||||||
},
|
|
||||||
"help": {
|
"help": {
|
||||||
"en": "If enabled, Hextris will be accessible by people who doesn't have an account. This can be changed later via the webadmin.",
|
"en": "If enabled, Hextris 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, Hextris sera accessible aux personnes n'ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
"fr": "Si cette case est cochée, Hextris sera accessible aux personnes n'ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||||
|
|
|
@ -11,12 +11,6 @@
|
||||||
- [ ] Upgrade from last version tested.
|
- [ ] Upgrade from last version tested.
|
||||||
- [ ] Can be reviewed and tested.
|
- [ ] Can be reviewed and tested.
|
||||||
|
|
||||||
## Validation
|
## Package_check results
|
||||||
---
|
---
|
||||||
- [ ] **Code review** :
|
* 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!"*
|
||||||
- [ ] **Approval (LGTM)** :
|
|
||||||
*Code review and approval have to be from a member of @YunoHost-Apps/apps-group*
|
|
||||||
- **CI succeeded** :
|
|
||||||
[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/hextris_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/hextris_ynh%20PR-NUM-/)
|
|
||||||
*Please replace '-NUM-' in this link by the PR number.*
|
|
||||||
When the PR is marked as ready to merge, you have to wait for 3 days before really merging it.
|
|
||||||
|
|
|
@ -29,6 +29,23 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
# Needed for helper "ynh_add_nginx_config"
|
# Needed for helper "ynh_add_nginx_config"
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
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=1
|
||||||
|
|
||||||
|
# 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
|
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -44,7 +44,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=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
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
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -78,12 +77,12 @@ chown -R root: $final_path
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||||
|
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
ynh_permission_update --permission "main" --add visitors
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -37,23 +37,13 @@ if [ -z "$final_path" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Migrate from legacy permission system
|
# Cleaning legacy permissions
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
if [ -n "$is_public" ]; then
|
|
||||||
# Removing skipped/unprotected_uris under certain conditions, remove the visitors group added during the migration process of 3.7
|
|
||||||
# Remove skipped_uris. If the app was public, add visitors again to the main permission
|
|
||||||
if ynh_permission_has_user --permission=main --user=visitors
|
|
||||||
then
|
|
||||||
ynh_app_setting_delete --app=$app --key=skipped_uris
|
|
||||||
ynh_permission_update --permission "main" --add "visitors"
|
|
||||||
else
|
|
||||||
ynh_app_setting_delete --app=$app --key=skipped_uris
|
|
||||||
fi
|
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue