Merge pull request #4 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2022-06-06 19:28:58 +02:00 committed by GitHub
commit 30610c9f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 124 additions and 104 deletions

View File

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Easy!Appointments for YunoHost
[![Integration level](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![Working status](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg)
[![Install Easy!Appointments with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=easyappointments)
*[Lire ce readme en français.](./README_fr.md)*
@ -29,31 +29,32 @@ The application is designed to be flexible enough so that it can handle any ente
- Translated user interface.
**Shipped version:** 1.4.2~ynh2
**Shipped version:** 1.4.3~ynh1
**Demo:** https://demo.easyappointments.org/
## Screenshots
![](./doc/screenshots/screenshots.png)
![Screenshot of Easy!Appointments](./doc/screenshots/screenshots.png)
## Documentation and resources
* Official app website: https://easyappointments.org/
* Official admin documentation: https://easyappointments.org/docs.html#1.4.1/readme.md
* Upstream app code repository: https://github.com/alextselegidis/easyappointments
* YunoHost documentation for this app: https://yunohost.org/app_easyappointments
* Report a bug: https://github.com/YunoHost-Apps/easyappointments_ynh/issues
* Official app website: <https://easyappointments.org/>
* Official admin documentation: <https://easyappointments.org/docs.html#1.4.3/readme.md>
* Upstream app code repository: <https://github.com/alextselegidis/easyappointments>
* YunoHost documentation for this app: <https://yunohost.org/app_easyappointments>
* Report a bug: <https://github.com/YunoHost-Apps/easyappointments_ynh/issues>
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug
or
sudo yunohost app upgrade easyappointments -u https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View File

@ -1,10 +1,14 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Easy!Appointments pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg)
[![Niveau d'intégration](https://dash.yunohost.org/integration/easyappointments.svg)](https://dash.yunohost.org/appci/app/easyappointments) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/easyappointments.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/easyappointments.maintain.svg)
[![Installer Easy!Appointments avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=easyappointments)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Easy!Appointments 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.*
@ -25,31 +29,32 @@ The application is designed to be flexible enough so that it can handle any ente
- Translated user interface.
**Version incluse :** 1.4.2~ynh2
**Version incluse :** 1.4.3~ynh1
**Démo :** https://demo.easyappointments.org/
## Captures d'écran
![](./doc/screenshots/screenshots.png)
![Capture d'écran de Easy!Appointments](./doc/screenshots/screenshots.png)
## Documentations et ressources
* Site officiel de l'app : https://easyappointments.org/
* Documentation officielle de l'admin : https://easyappointments.org/docs.html#1.4.1/readme.md
* Dépôt de code officiel de l'app : https://github.com/alextselegidis/easyappointments
* Documentation YunoHost pour cette app : https://yunohost.org/app_easyappointments
* Signaler un bug : https://github.com/YunoHost-Apps/easyappointments_ynh/issues
* Site officiel de l'app : <https://easyappointments.org/>
* Documentation officielle de l'admin : <https://easyappointments.org/docs.html#1.4.3/readme.md>
* Dépôt de code officiel de l'app : <https://github.com/alextselegidis/easyappointments>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_easyappointments>
* Signaler un bug : <https://github.com/YunoHost-Apps/easyappointments_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug
ou
sudo yunohost app upgrade easyappointments -u https://github.com/YunoHost-Apps/easyappointments_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View File

@ -1,10 +1,8 @@
;; Test complet
; Manifest
domain="domain.tld"
path="/path"
admin="john"
language="english"
is_public=1
language="english"
; Checks
pkg_linter=1
setup_sub_dir=0
@ -13,14 +11,12 @@
setup_private=1
setup_public=1
upgrade=1
#upgrade=1 from_commit=CommitHash
# 1.4.3~ynh1
upgrade=1 from_commit=e7afe099868faab80c14135cc4a11c1a82128f81
backup_restore=1
multi_instance=1
port_already_use=0
change_url=1
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&

View File

@ -40,7 +40,7 @@ class Config {
const DB_HOST = 'localhost';
const DB_NAME = '__DB_NAME__';
const DB_USERNAME = '__DB_NAME__';
const DB_USERNAME = '__DB_USER__';
const DB_PASSWORD = '__DB_PWD__';
// ------------------------------------------------------------------------

View File

@ -1,10 +1,12 @@
location / {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __FINALPATH__/;
alias __FINALPATH__/ ;
index index.php index.html;
index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M;
try_files $uri $uri/ index.php;

View File

@ -1,55 +1,55 @@
{
"name": "Easy!Appointments",
"id": "easyappointments",
"packaging_format": 1,
"description": {
"en": "Open Source Appointment Scheduler",
"fr": "Planificateur de rendez-vous Open Source"
},
"version": "1.4.3~ynh1",
"url": "https://easyappointments.org/",
"upstream": {
"name": "Easy!Appointments",
"id": "easyappointments",
"packaging_format": 1,
"description": {
"en": "Open Source Appointment Scheduler",
"fr": "Planificateur de rendez-vous Open Source"
},
"version": "1.4.3~ynh1",
"url": "https://easyappointments.org/",
"upstream": {
"license": "GPL-3.0-only",
"website": "https://easyappointments.org/",
"demo": "https://demo.easyappointments.org/",
"admindoc": "https://easyappointments.org/docs.html#1.4.1/readme.md",
"admindoc": "https://easyappointments.org/docs.html#1.4.3/readme.md",
"code": "https://github.com/alextselegidis/easyappointments"
},
"license": "GPL-3.0-only",
"maintainer": {
"name": "eric_G",
"email": ""
},
"requirements": {
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm",
"mysql"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain"
},
{
"name": "is_public",
"type": "boolean",
"default": true
"license": "GPL-3.0-only",
"maintainer": {
"name": "eric_G",
"email": ""
},
{
"name": "language",
"type": "string",
"ask": {
"en": "Choose the application language",
"fr": "Choisissez la langue de l'application"
},
"choices": ["french", "english"],
"default": "english"
}
]
}
"requirements": {
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [
"nginx",
"php7.4-fpm",
"mysql"
],
"arguments": {
"install": [
{
"name": "domain",
"type": "domain"
},
{
"name": "is_public",
"type": "boolean",
"default": true
},
{
"name": "language",
"type": "string",
"ask": {
"en": "Choose the application language",
"fr": "Choisissez la langue de l'application"
},
"choices": ["french", "english"],
"default": "english"
}
]
}
}

View File

@ -7,3 +7,15 @@
YNH_PHP_VERSION="7.3"
pkg_dependencies="php${YNH_PHP_VERSION}-curl"
#=================================================
# PERSONAL HELPERS
#=================================================
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================

View File

@ -26,13 +26,17 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# Add settings here as needed by your application
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
language=$(ynh_app_setting_get --app=$app --key=language)
#=================================================
# 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
@ -98,7 +102,9 @@ fi
#=================================================
# SPECIFIC MODIFICATIONS
#=================================================
ynh_script_progression --message="Configuring $app..." --weight=1
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1
domain=$new_domain

View File

@ -22,9 +22,8 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url="/"
language=$YNH_APP_ARG_LANGUAGE
is_public=$YNH_APP_ARG_IS_PUBLIC
phpversion=$YNH_PHP_VERSION
language=$YNH_APP_ARG_LANGUAGE
app=$YNH_APP_INSTANCE_NAME
@ -47,8 +46,9 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
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=language --value=$language
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# INSTALL DEPENDENCIES
#=================================================
@ -56,15 +56,13 @@ ynh_script_progression --message="Installing dependencies..." --weight=1
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# CREATE A MYSQL DATABASE

View File

@ -37,14 +37,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=4
# Remove a database if it exists, along with the associated user
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# REMOVE APP MAIN DIR
#=================================================
@ -69,6 +61,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=3
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
ynh_script_progression --message="Removing dependencies..." --weight=1
# Remove metapackage and its dependencies
ynh_remove_app_dependencies
#=================================================
# GENERIC FINALIZATION
#=================================================

View File

@ -20,7 +20,7 @@ ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
ynh_script_progression --message="Loading settings..." --weight=1
ynh_script_progression --message="Loading installation settings..." --weight=1
app=$YNH_APP_INSTANCE_NAME
@ -44,7 +44,7 @@ test ! -d $final_path \
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
@ -54,7 +54,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR

View File

@ -27,18 +27,19 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=7
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=7
# 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
@ -67,19 +68,18 @@ fi
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php"
ynh_setup_source --dest_dir="$final_path" --keep="config.php storage/"
fi
chmod 750 "$final_path"