1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
* Upgrade to 2.0.12
This commit is contained in:
Éric Gaspar 2021-03-11 13:47:37 +01:00 committed by GitHub
parent 0127b6ce33
commit 9086034ce5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 35 deletions

View file

@ -14,7 +14,7 @@ Webtrees allows you to view and edit your genealogy on your website. It has full
**Note:** Its better to upgrade from the Webtrees admin panel when new version arrives.
**Shipped version:** 2.0.11
**Shipped version:** 2.0.12
## Screenshots

View file

@ -19,6 +19,7 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=0127b6ce332d4314d139cd62796cb0350adc37f8
backup_restore=1
multi_instance=1
port_already_use=0
@ -26,3 +27,9 @@
;;; Options
Email=anmol@datamol.org
Notification=change
;;; Upgrade options
; commit=0127b6ce332d4314d139cd62796cb0350adc37f8
name=Testing (#18)
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/fisharebest/webtrees/releases/download/2.0.11/webtrees-2.0.11.zip
SOURCE_SUM=b48964e5bd282ce420fd1f5162e44d2cdb2907fd3226830f45f5744630ce0075
SOURCE_URL=https://github.com/fisharebest/webtrees/releases/download/2.0.12/webtrees-2.0.12.zip
SOURCE_SUM=c2097116d8e2424f2a1c12de346113dbb4bba780761988aae403cd38936f31e9
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true

View file

@ -1,7 +1,7 @@
; <?php exit; ?> DO NOT DELETE THIS LINE
dbhost="localhost"
dbport="3306"
dbuser="__dbuser__"
dbpass="__dbpass__"
dbname="__dbname__"
dbuser="__DB_USER__"
dbpass="__DB_PWD__"
dbname="__DB_NAME__"
tblpfx="wt_"

View file

@ -6,7 +6,7 @@
"en": "Web-based genealogy application",
"fr": "Logiciel libre de généalogie en ligne"
},
"version":"2.0.11~ynh1",
"version":"2.0.12~ynh1",
"url": "https://www.webtrees.net",
"license": "GPL-3.0-or-later",
"maintainer": {
@ -14,12 +14,12 @@
"email": "anmol@datamol.org"
},
"requirements": {
"yunohost": ">= 4.0.0"
"yunohost": ">= 4.1.7"
},
"multi_instance": true,
"services": [
"nginx",
"php7.0-fpm",
"php7.3-fpm",
"mysql"
],
"arguments": {

View file

@ -13,6 +13,4 @@
## Package_check results
---
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*
[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/webtrees_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/webtrees_ynh%20PR-NUM-%20(USERNAME)/)
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*

View file

@ -48,7 +48,6 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
ynh_script_progression --message="Storing installation settings..."
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
@ -107,9 +106,9 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
# Adding the details of the database to the config file
ynh_replace_string --match_string="__dbuser__" --replace_string="$db_name" --target_file="../conf/config.ini.php"
ynh_replace_string --match_string="__dbpass__" --replace_string="$db_pwd" --target_file="../conf/config.ini.php"
ynh_replace_string --match_string="__dbname__" --replace_string="$db_name" --target_file="../conf/config.ini.php"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="../conf/config.ini.php"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="../conf/config.ini.php"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="../conf/config.ini.php"
# Copy the config file to the final path
cp ../conf/config.ini.php $final_path/data/.
@ -145,14 +144,12 @@ chmod -R 700 $final_path/data
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_script_progression --message="Configuring permissions..."
# Make app public if necessary or protect it
if [ $is_public -eq 1 ]
then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission "main" --add "visitors"
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

@ -17,25 +17,15 @@ ynh_script_progression --message="Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain)
path_url=$(ynh_app_setting_get "$app" path)
is_public=$(ynh_app_setting_get "$app" is_public)
final_path=$(ynh_app_setting_get $app final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..."
# Fix is_public as a boolean value
if [ "$is_public" = "Yes" ]; then
ynh_app_setting_set $app is_public 1
is_public=1
elif [ "$is_public" = "No" ]; then
ynh_app_setting_set $app is_public 0
is_public=0
fi
# If db_name doesn't exist, create it
if [ -z $db_name ]; then
db_name=$(ynh_sanitize_dbid --db_name=$app)
@ -48,6 +38,13 @@ if [ -z $final_path ]; then
ynh_app_setting_set $app final_path $final_path
fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -115,8 +112,6 @@ ynh_add_fpm_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# ...
#=================================================
ynh_backup_if_checksum_is_different "$final_path/data/config.ini.php"
# Recalculate and store the checksum of the file for the next upgrade.