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

Merge pull request #63 from YunoHost-Apps/1.1

1.1.12
This commit is contained in:
Robles Rodolphe 2021-11-03 23:47:10 +01:00 committed by GitHub
commit 7b422f94e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 76 additions and 47 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Garradin (word meaning money in an aboriginal dialect of northern Australia, pronounced "gar-a-dine" em) is software for associative management. It is the tool of choice for managing an association, a sports club, an NGO, etc. It is designed to meet the needs of a small to medium-sized structure: management of members, accounting, website, note-taking in meetings, archiving and sharing of the association's operating documents, discussion between members, etc. etc. .
**Shipped version:** 1.1.10~ynh1
**Shipped version:** 1.1.12~ynh1
**Demo:** https://garradin.eu/essai/
@ -29,7 +29,7 @@ Garradin (word meaning money in an aboriginal dialect of northern Australia, pro
* Official app website: http://garradin.eu
* Official admin documentation: https://fossil.kd2.org/garradin/wiki?name=Documentation
* Upstream app code repository: https://fossil.kd2.org/garradin/wiki?name=Garradin
* Upstream app code repository: https://fossil.kd2.org/garradin/dir?ci=tip
* YunoHost documentation for this app: https://yunohost.org/app_garradin
* Report a bug: https://github.com/YunoHost-Apps/garradin_ynh/issues

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Garradin (mot signifiant argent dans un dialecte aborigène du nord de l'Australie, prononcé « gar-a-dine »em) est un logiciel de gestion associative. Il est l'outil de prédilection pour gérer une association, un club sportif, une ONG, etc. Il est conçu pour répondre aux besoins d'une structure de petite à moyenne taille : gestion des adhérents, comptabilité, site web, prise de notes en réunion, archivage et partage des documents de fonctionnement de l'association, discussion entre adhérents, etc etc.
**Version incluse :** 1.1.10~ynh1
**Version incluse :** 1.1.12~ynh1
**Démo :** https://garradin.eu/essai/
@ -25,7 +25,7 @@ Garradin (mot signifiant argent dans un dialecte aborigène du nord de l'Austral
* Site officiel de l'app : http://garradin.eu
* Documentation officielle de l'admin : https://fossil.kd2.org/garradin/wiki?name=Documentation
* Dépôt de code officiel de l'app : https://fossil.kd2.org/garradin/wiki?name=Garradin
* Dépôt de code officiel de l'app : https://fossil.kd2.org/garradin/dir?ci=tip
* Documentation YunoHost pour cette app : https://yunohost.org/app_garradin
* Signaler un bug : https://github.com/YunoHost-Apps/garradin_ynh/issues

View file

@ -11,7 +11,7 @@
setup_private=1
setup_public=1
upgrade=1
#upgrade=1 from_commit=a36dd8b13d85078ddcee0d6d3146feb107d3e042
upgrade=1 from_commit=2be21892a9b479710405a6ecd74ffb0541e0d202
backup_restore=1
multi_instance=1
change_url=1
@ -19,6 +19,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=a36dd8b13d85078ddcee0d6d3146feb107d3e042
; commit=2be21892a9b479710405a6ecd74ffb0541e0d202
name=Merge pull request #55 from yunohost-bot/issue-and-pr-template
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

5
conf/1.1.0.src Normal file
View file

@ -0,0 +1,5 @@
SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.0.tar.bz2
SOURCE_SUM=8689c62754d3b7920cf59786379e085a591fc1763dd3ec8fd13736e916c659bd
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.10.tar.bz2
SOURCE_SUM=56785921ce99d8424871bf340a3225016fede10345e3ce9fe51e47facc2e88cc
SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.1.12.tar.bz2
SOURCE_SUM=5f1994d6f39feac1f261ca1bce84a3f312def53e47a8faa197cd41ef657d5ab9
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View file

@ -6,14 +6,14 @@
"en": "Software to manage association",
"fr": "Logiciel libre de gestion d'association"
},
"version": "1.1.10~ynh1",
"version": "1.1.12~ynh1",
"url": "http://garradin.eu",
"upstream": {
"license": "GPL-3.0-or-later",
"website": "http://garradin.eu",
"demo": "https://garradin.eu/essai/",
"admindoc": "https://fossil.kd2.org/garradin/wiki?name=Documentation",
"code": "https://fossil.kd2.org/garradin/wiki?name=Garradin"
"code": "https://fossil.kd2.org/garradin/dir?ci=tip"
},
"license": "GPL-3.0-or-later",
"maintainer": {
@ -26,7 +26,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm"
"php7.4-fpm"
],
"arguments": {
"install" : [

View file

@ -40,8 +40,11 @@ ynh_remove_nginx_config
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
# Remove the app dependencies installed along with php-fpm
ynh_remove_app_dependencies
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config --package="$extra_php_dependencies"
ynh_remove_fpm_config
#=================================================
# GENERIC FINALIZATION

View file

@ -25,11 +25,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# CHECK VERSION
#=================================================
if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then
upgrade_type="0.9.8"
else
upgrade_type=$(ynh_check_app_version_changed)
fi
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
@ -83,11 +79,11 @@ fi
# UPGRADE TO 0.9.8 if necessary
#=================================================
if [ "$upgrade_type" == "0.9.8" ]
if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1
then
ynh_script_progression --message="Upgrading upgrade to 0.9.8" --weight=5
# Download, check integrity, uncompress and patch the source from 0.9.8.src
ynh_setup_source --dest_dir="$final_path" --source_id="0.9.8"
ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="0.9.8"
# Set permissions on app files
ynh_system_user_create --username=$app
ynh_add_nginx_config
@ -101,41 +97,75 @@ then
if [ -d "$backup_squelettes" ]
then
cp -ar $backup_squelettes $final_path/www/squelettes
ynh_secure_remove $backup_squelettes
fi
if [ -e "$backup_bdd" ]
then
cp -a $backup_bdd $final_path/association.sqlite
ynh_secure_remove $backup_bdd
fi
chown -R $app:$app $final_path
key=$(ynh_string_random --length=50)
cp -a $final_path/config.dist.php $final_path/config.local.php
ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = '$key';" --target_file="$final_path/config.local.php"
if [ "$path_url" == "/" ]; then
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url';" --target_file="$final_path/config.local.php"
else
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
fi
chmod 755 $final_path
# Create the visitors permission if needed
visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo 0 || echo 1)
if [[ $visitors_enabled -eq 0 ]]; then
# Temporarily enable visitors for curl if needed
visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo yes || echo no)
if [[ $visitors_enabled == "no" ]]; then
ynh_permission_update --permission "main" --add "visitors"
fi
ynh_systemd_action --service_name=nginx --action=reload
# Finalize the upgrade
ynh_local_curl "/index.php"
sleep 5
ynh_local_curl "/index.php"
upgrade_type="UPGRADE_APP"
if [[ $visitors_enabled -eq 0 ]]; then
if [[ $visitors_enabled == "no" ]]; then
ynh_permission_update --permission "main" --remove "visitors"
fi
fi
#=================================================
# UPGRADE TO 1.1.0 if necessary
#=================================================
if ynh_compare_current_package_version --comparison lt --version 1.1.0~ynh1
then
ynh_script_progression --message="Upgrading upgrade to 1.1.0" --weight=5
# Download, check integrity, uncompress and patch the source from 0.9.8.src
ynh_setup_source --keep="config.local.php" --dest_dir="$final_path" --source_id="1.1.0"
# Set permissions on app files
ynh_system_user_create --username=$app
ynh_add_nginx_config
ynh_add_fpm_config --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
ynh_script_progression --message="restore data..." --weight=10
backup_bdd=/tmp/association.sqlite
backup_squelettes=/tmp/squelettes
if [ -d "$backup_squelettes" ]
then
cp -ar $backup_squelettes $final_path/www/squelettes
fi
if [ -e "$backup_bdd" ]
then
cp -a $backup_bdd $final_path/association.sqlite
fi
chown -R $app:$app $final_path
chmod 755 $final_path
# Temporarily enable visitors for curl if needed
visitors_enabled=$(ynh_permission_has_user "main" "visitors" && echo yes || echo no)
if [[ $visitors_enabled == "no" ]]; then
ynh_permission_update --permission "main" --add "visitors"
fi
# Finalize the upgrade
ynh_local_curl "/index.php"
sleep 5
ynh_local_curl "/index.php"
if [[ $visitors_enabled == "no" ]]; then
ynh_permission_update --permission "main" --remove "visitors"
fi
fi
@ -156,7 +186,7 @@ ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
ynh_setup_source --keep="config.local.php" --dest_dir="$final_path"
fi
#=================================================
@ -200,15 +230,6 @@ fi
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=5
key=$(ynh_string_random --length=50)
cp -a $final_path/config.dist.php $final_path/config.local.php
ynh_replace_string --match_string="const SECRET_KEY = '3xUhIgGwuovRKOjVsVPQ5yUMfXUSIOX2GKzcebsz5OINrYC50r';" --replace_string="const SECRET_KEY = '$key';" --target_file="$final_path/config.local.php"
if [ "$path_url" == "/" ]; then
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url';" --target_file="$final_path/config.local.php"
else
ynh_replace_string --match_string="//const WWW_URI = '/asso/';" --replace_string="const WWW_URI = '$path_url/';" --target_file="$final_path/config.local.php"
fi
# Permissions on files and directories
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"