1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/framagames_ynh.git synced 2024-09-03 18:36:28 +02:00

Merge pull request #26 from YunoHost-Apps/ci-auto-update-2022.12.28

This commit is contained in:
Salamandar 2024-07-13 14:50:53 +02:00 committed by GitHub
commit 86d5542f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 125 additions and 66 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Framagames for YunoHost
[![Integration level](https://dash.yunohost.org/integration/framagames.svg)](https://dash.yunohost.org/appci/app/framagames) ![Working status](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/framagames.svg)](https://ci-apps.yunohost.org/ci/apps/framagames/) ![Working status](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Install Framagames with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framagames)
@ -18,7 +18,7 @@ It shall NOT be edited by hand.
Set of games Framagames from Framasoft.
**Shipped version:** 1.0~ynh5
**Shipped version:** 2022.12.28~ynh1
## Documentation and resources
- Official app website: <https://framagit.org/framasoft/framagames>

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# Framagames para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/framagames.svg)](https://dash.yunohost.org/appci/app/framagames) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/framagames.svg)](https://ci-apps.yunohost.org/ci/apps/framagames/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Instalar Framagames con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framagames)
@ -18,7 +18,7 @@ No se debe editar a mano.
Set of games Framagames from Framasoft.
**Versión actual:** 1.0~ynh5
**Versión actual:** 2022.12.28~ynh1
## Documentaciones y recursos
- Sitio web oficial: <https://framagit.org/framasoft/framagames>

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# Framagames YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/framagames.svg)](https://dash.yunohost.org/appci/app/framagames) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Integrazio maila](https://dash.yunohost.org/integration/framagames.svg)](https://ci-apps.yunohost.org/ci/apps/framagames/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Instalatu Framagames YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framagames)
@ -18,7 +18,7 @@ EZ editatu eskuz.
Set of games Framagames from Framasoft.
**Paketatutako bertsioa:** 1.0~ynh5
**Paketatutako bertsioa:** 2022.12.28~ynh1
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://framagit.org/framasoft/framagames>

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Framagames pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/framagames.svg)](https://dash.yunohost.org/appci/app/framagames) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Niveau dintégration](https://dash.yunohost.org/integration/framagames.svg)](https://ci-apps.yunohost.org/ci/apps/framagames/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Installer Framagames avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framagames)
@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Set of games Framagames from Framasoft.
**Version incluse:** 1.0~ynh5
**Version incluse:** 2022.12.28~ynh1
## Documentations et ressources
- Site officiel de lapp: <https://framagit.org/framasoft/framagames>

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Framagames para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/framagames.svg)](https://dash.yunohost.org/appci/app/framagames) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Nivel de integración](https://dash.yunohost.org/integration/framagames.svg)](https://ci-apps.yunohost.org/ci/apps/framagames/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![Instalar Framagames con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framagames)
@ -18,7 +18,7 @@ NON debe editarse manualmente.
Set of games Framagames from Framasoft.
**Versión proporcionada:** 1.0~ynh5
**Versión proporcionada:** 2022.12.28~ynh1
## Documentación e recursos
- Web oficial da app: <https://framagit.org/framasoft/framagames>

View file

@ -5,7 +5,7 @@
# YunoHost 上的 Framagames
[![集成程度](https://dash.yunohost.org/integration/framagames.svg)](https://dash.yunohost.org/appci/app/framagames) ![工作状态](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![集成程度](https://dash.yunohost.org/integration/framagames.svg)](https://ci-apps.yunohost.org/ci/apps/framagames/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/framagames.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/framagames.maintain.svg)
[![使用 YunoHost 安装 Framagames](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=framagames)
@ -18,7 +18,7 @@
Set of games Framagames from Framasoft.
**分发版本:** 1.0~ynh5
**分发版本:** 2022.12.28~ynh1
## 文档与资源
- 官方应用网站: <https://framagit.org/framasoft/framagames>

View file

@ -1,4 +0,0 @@
; Additional php.ini defines, specific to this pool of workers.
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M

View file

@ -2,24 +2,9 @@
location __PATH__/ {
# Path to source
alias __INSTALL_DIR__/;
alias __INSTALL_DIR__/www/;
index index.php index.html;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
client_max_body_size 10G;
try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
index index.html;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;

View file

@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
packaging_format = 2
id = "framagames"
@ -5,7 +7,7 @@ name = "Framagames"
description.en = "Set of games Framagames from Framasoft"
description.fr = "Ensemble de jeux Framagames venant de Framasoft"
version = "1.0~ynh5"
version = "2022.12.28~ynh1"
maintainers = []
@ -38,11 +40,11 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
[resources.sources.main]
url = "https://framagit.org/framasoft/framagames/-/archive/5510754d92e9649aa1808ffb1d3255d5da1ebf47/framagames-5510754d92e9649aa1808ffb1d3255d5da1ebf47.tar.bz2"
sha256 = "3a58583fd0e7a7b81d4b2db0ff04a588eb0a04c574f0f36d681a2969e6648e9d"
url = "https://framagit.org/framasoft/framagames/-/archive/6808f75cd18f4a1bb0345ce65d055e2dfef8c0b7/framagames-6808f75cd18f4a1bb0345ce65d055e2dfef8c0b7.tar.gz"
sha256 = "6c2bf60663dad46ac6660ddb3634d1c05dcf38cea1f2687b8ee26743deb8a10e"
autoupdate.strategy = "latest_gitlab_commit"
autoupdate.strategy = "latest_gitlab_commit"
[resources.system_user]
@ -50,6 +52,3 @@ ram.runtime = "50M"
[resources.permissions]
main.url = "/"
[resources.apt]
packages = "php8.2-fpm"

View file

@ -4,10 +4,43 @@
# COMMON VARIABLES
#=================================================
nodejs_version=12
#=================================================
# PERSONAL HELPERS
#=================================================
_configure_framagames() {
ynh_replace_string --target_file="$install_dir/sources/src/data/main.yml" \
--match_string="canonical: .*" \
--replace_string="canonical: https://$domain$path"
ynh_replace_string --target_file="$install_dir/sources/src/data/main.yml" \
--match_string="framanav: true" \
--replace_string="framanav: false"
# %/ is here to prevent double slash when path is /
ynh_replace_string --target_file="$install_dir/sources/config/env.js" \
--match_string=" basepath:.*" \
--replace_string=" basepath: '${path%/}/', wrong_path: false"
}
_build_install_framagames() {
pushd "$install_dir/sources"
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" run commons
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" "$ynh_npm" run prod
popd
ynh_secure_remove --file="$install_dir/www"
mv -f "$install_dir/sources/dist" "$install_dir/www"
cp -r "$install_dir/sources/games/"* "$install_dir/www"
if [[ "$path" != "/" ]]; then
mv -f "$install_dir/www/$path/"* "$install_dir/www"
fi
chown -R "$app:www-data" "$install_dir"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -25,12 +25,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -14,6 +14,20 @@ ynh_script_progression --message="Updating NGINX web server configuration..."
ynh_change_url_nginx_config
#=================================================
# CONFIGURE APP
#=================================================
ynh_script_progression --message="Configuring $app..."
_configure_framagames
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building $app..."
_build_install_framagames
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -7,25 +7,43 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# INSTALL NODEJS
#=================================================
ynh_script_progression --message="Installing NodeJS..." --weight=1
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Setting up source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
ynh_setup_source --dest_dir="$install_dir/sources"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# PHP-FPM CONFIGURATION
# CONFIGURE APP
#=================================================
ynh_script_progression --message="Configuring $app..."
_configure_framagames
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building $app..."
_build_install_framagames
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
# Create a dedicated NGINX config
ynh_add_nginx_config

View file

@ -12,11 +12,9 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
ynh_remove_nodejs
#=================================================
# END OF SCRIPT

View file

@ -8,6 +8,13 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# INSTALL NODEJS
#=================================================
ynh_script_progression --message="Restoring NodeJS..." --weight=1
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -16,15 +23,13 @@ ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
@ -32,7 +37,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -7,24 +7,42 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# INSTALL NODEJS
#=================================================
ynh_script_progression --message="Updating NodeJS..." --weight=1
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --full_replace=1
ynh_setup_source --dest_dir="$install_dir/sources" --full_replace=1
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
# CONFIGURE APP
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
ynh_script_progression --message="Configuring $app..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
_configure_framagames
#=================================================
# BUILD APP
#=================================================
ynh_script_progression --message="Building $app..."
_build_install_framagames
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config