From 24f814edd8a358ea1c2bb0a5a3f9dc2a102ed22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 17 Aug 2022 18:35:18 +0200 Subject: [PATCH] Bullseye (#20) * set relative path for --keep opt * Auto-update README * Fix * Update restore * Update restore Co-authored-by: yunohost-bot --- README.md | 20 ++++++++++---------- README_fr.md | 28 ++++++++++++++++------------ manifest.json | 4 ++-- scripts/_common.sh | 2 +- scripts/restore | 24 +++++++++++++----------- scripts/upgrade | 6 +++--- 6 files changed, 45 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index da023a9..72e7a30 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # MineWeb for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mineweb.svg)](https://dash.yunohost.org/appci/app/mineweb) ![](https://ci-apps.yunohost.org/ci/badges/mineweb.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mineweb.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mineweb.svg)](https://dash.yunohost.org/appci/app/mineweb) ![Working status](https://ci-apps.yunohost.org/ci/badges/mineweb.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mineweb.maintain.svg) [![Install MineWeb with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mineweb) *[Lire ce readme en français.](./README_fr.md)* @@ -23,28 +23,28 @@ Vous pourrez tenir vos joueurs au courant des actualités, leur faire acheter de **Shipped version:** 1.15.1~ynh1 - ## Screenshots -![](./doc/screenshots/features1_mb.png) +![Screenshot of MineWeb](./doc/screenshots/features1_mb.png) ## Documentation and resources -* Official app website: https://mineweb.org/ -* Official admin documentation: https://docs.mineweb.org/ -* Upstream app code repository: https://github.com/MineWeb/MineWebCMS/ -* YunoHost documentation for this app: https://yunohost.org/app_mineweb -* Report a bug: https://github.com/YunoHost-Apps/mineweb_ynh/issues +* Official app website: +* Official admin documentation: +* 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/mineweb_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mineweb_ynh/tree/testing --debug or sudo yunohost app upgrade mineweb -u https://github.com/YunoHost-Apps/mineweb_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 9a9f81d..979fd59 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # MineWeb pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mineweb.svg)](https://dash.yunohost.org/appci/app/mineweb) ![](https://ci-apps.yunohost.org/ci/badges/mineweb.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mineweb.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/mineweb.svg)](https://dash.yunohost.org/appci/app/mineweb) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mineweb.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mineweb.maintain.svg) [![Installer MineWeb avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mineweb) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer MineWeb 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.* @@ -16,31 +20,31 @@ MineWeb est un CMS (c'est-à-dire un système de gestion de contenu), en plus si Vous pourrez tenir vos joueurs au courant des actualités, leur faire acheter des articles sur la boutique... Vous pourrez personnaliser le CMS avec toutes sortes de thèmes ou plugins ! Ceux-ci sont disponibles sur le market ou peuvent être développés par vous-même. -**Version incluse :** 1.15.1~ynh1 - +**Version incluse :** 1.15.1~ynh1 ## Captures d'écran -![](./doc/screenshots/features1_mb.png) +![Capture d'écran de MineWeb](./doc/screenshots/features1_mb.png) ## Documentations et ressources -* Site officiel de l'app : https://mineweb.org/ -* Documentation officielle de l'admin : https://docs.mineweb.org/ -* Dépôt de code officiel de l'app : https://github.com/MineWeb/MineWebCMS/ -* Documentation YunoHost pour cette app : https://yunohost.org/app_mineweb -* Signaler un bug : https://github.com/YunoHost-Apps/mineweb_ynh/issues +* Site officiel de l'app : +* Documentation officielle de l'admin : +* 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/mineweb_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mineweb_ynh/tree/testing --debug ou sudo yunohost app upgrade mineweb -u https://github.com/YunoHost-Apps/mineweb_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/manifest.json b/manifest.json index 9ad0b45..8a05d8b 100644 --- a/manifest.json +++ b/manifest.json @@ -20,12 +20,12 @@ "email": "liberodark@gmail.com" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php7.4-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index b88b4f5..d1d0a6e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" # dependencies used by the app pkg_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl" diff --git a/scripts/restore b/scripts/restore index 4218fb2..511252d 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,16 +34,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -63,6 +58,14 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= @@ -71,12 +74,11 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= -# REINSTALL DEPENDENCIES +# RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE MYSQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 1989288..bbbb56e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,7 +86,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=7 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/app/Config/database.php" + ynh_setup_source --dest_dir="$final_path" --keep="app/Config/database.php" fi chmod 750 "$final_path" @@ -119,9 +119,9 @@ ynh_add_fpm_config #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Updating a configuration file..."--weight=1 +#ynh_script_progression --message="Updating a configuration file..."--weight=1 -ynh_add_config --template="../conf/database.php" --destination="$final_path/app/Config/database.php" +#ynh_add_config --template="../conf/database.php" --destination="$final_path/app/Config/database.php" #================================================= # MODIFY FIRST.CTP