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 #48 from YunoHost-Apps/testing

Testing
This commit is contained in:
Robles Rodolphe 2021-03-30 11:00:30 +02:00 committed by GitHub
commit 5fbf4d062c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 49 deletions

View file

@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview ## Overview
Garradin is a free association managing software. Garradin is a free association managing software.
**Shipped version:** 1.0.6 **Shipped version:** 1.0.7
## Screenshots ## Screenshots

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Vue d'ensemble ## Vue d'ensemble
Garradin est un logiciel libre de gestion associative. il permet de gérer des membres. Garradin est un logiciel libre de gestion associative. il permet de gérer des membres.
**Version incluse :** 1.0.6 **Version incluse :** 1.0.7
## Captures d'écran ## Captures d'écran

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.6.tar.bz2 SOURCE_URL=https://fossil.kd2.org/garradin/uv/garradin-1.0.7.tar.bz2
SOURCE_SUM=dcb2b5481fdd9ca2544f1e1f81fff1067d6eb7189e0f8547c98f6413040cf65b SOURCE_SUM=bf54afad2ebd1e04cb5fa7f5a2033a7c790e30e7fb69b6795b103d66dfcb6c06
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.bz2 SOURCE_FORMAT=tar.bz2
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Software to manage association", "en": "Software to manage association",
"fr": "Logiciel libre de gestion d'association" "fr": "Logiciel libre de gestion d'association"
}, },
"version": "1.0.6~ynh1", "version": "1.0.7~ynh1",
"url": "http://garradin.eu/a-propos/", "url": "http://garradin.eu/a-propos/",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"maintainer": { "maintainer": {
@ -26,29 +26,17 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain for Garradin",
"fr": "Choisissez un domaine pour Garradin"
},
"example": "domain.org" "example": "domain.org"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for Garradin",
"fr": "Choisissez un chemin pour Garradin"
},
"example": "/garradin", "example": "/garradin",
"default": "/garradin" "default": "/garradin"
}, },
{ {
"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": "The SSO is not implemented for this app and yunohost is not sure for hundred of users...", "en": "The SSO is not implemented for this app and yunohost is not sure for hundred of users...",
"fr": "Le SSO n'est pas implémenté pour cette application et yunohost n'est pas sûr pour une centaine d'utilisateurs..." "fr": "Le SSO n'est pas implémenté pour cette application et yunohost n'est pas sûr pour une centaine d'utilisateurs..."

View file

@ -20,7 +20,7 @@ ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
ynh_script_progression --message="Loading installation settings..." ynh_print_info "Declaring files to be backed up..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME

View file

@ -33,9 +33,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh
final_path=/var/www/$app final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder" test ! -e "$final_path" || ynh_die "This path already contains a folder"
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path $path_url)
# Check web path availability # Check web path availability
ynh_webpath_available $domain $path_url ynh_webpath_available $domain $path_url
# Register (book) web path # Register (book) web path

View file

@ -24,8 +24,12 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
if ynh_compare_current_package_version --comparison lt --version 0.9.8.1~ynh1; then
ynh_print_info --message="Sorry your version is outdated and need first an update to version 0.9.8.1 with the branch 0.9.8, proceed like that: 'sudo yunohost app upgrade garradin -u https://github.com/YunoHost-Apps/garradin_ynh/tree/0.9.8 --debug' and open your admin page to finalize before next update"
ynh_die "Sorry your version is outdated and need first an update to version 0.9.8.1 with the branch 0.9.8, proceed like that: 'sudo yunohost app upgrade garradin -u https://github.com/YunoHost-Apps/garradin_ynh/tree/0.9.8 --debug' and open your admin page to finalize before next update"
else
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
fi
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
@ -38,28 +42,6 @@ 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
### If nobody installed your app before 3.7,
### then you may safely remove these lines
# Cleaning legacy permissions
# is_public=$(ynh_app_setting_get --app=$app --key=is_public)
if [ -n "$is_public" ]; then
# Remove protected_uris
ynh_app_setting_delete --app=$app --key=protected_uris
#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
fi
#================================================= #=================================================
# Backup Data # Backup Data
#================================================= #=================================================
@ -124,7 +106,7 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies" ynh_add_fpm_config --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#======================================================= #=======================================================
# backup bdd, squelettes directory and config.local.php # backup bdd, squelettes directory and config.local.php
#======================================================= #=======================================================
@ -136,11 +118,13 @@ backup_squelettes=/tmp/squelettes
if [ -d "$backup_squelettes" ] if [ -d "$backup_squelettes" ]
then then
cp -ar $backup_squelettes $final_path/www/squelettes cp -ar $backup_squelettes $final_path/www/squelettes
ynh_secure_remove $backup_squelettes
fi fi
if [ -e "$backup_bdd" ] if [ -e "$backup_bdd" ]
then then
cp -a $backup_bdd $final_path/association.sqlite cp -a $backup_bdd $final_path/association.sqlite
ynh_secure_remove $backup_bdd
fi fi
key=$(ynh_string_random --length=50) key=$(ynh_string_random --length=50)