From 9086034ce59ddf2d64d3ed38d97436c251ad9e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 11 Mar 2021 13:47:37 +0100 Subject: [PATCH] Testing (#21) * Upgrade to 2.0.12 --- README.md | 2 +- check_process | 7 +++++++ conf/app.src | 4 ++-- conf/config.ini.php | 6 +++--- manifest.json | 6 +++--- pull_request_template.md | 4 +--- scripts/install | 13 +++++-------- scripts/upgrade | 25 ++++++++++--------------- 8 files changed, 32 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index a9350e1..776e614 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/check_process b/check_process index 362cb49..e3ad794 100644 --- a/check_process +++ b/check_process @@ -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& + + diff --git a/conf/app.src b/conf/app.src index 2f20524..a0fabb9 100644 --- a/conf/app.src +++ b/conf/app.src @@ -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 diff --git a/conf/config.ini.php b/conf/config.ini.php index 78c6d31..d0f1ac0 100755 --- a/conf/config.ini.php +++ b/conf/config.ini.php @@ -1,7 +1,7 @@ ; 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_" diff --git a/manifest.json b/manifest.json index 7f4ebcd..9103e85 100644 --- a/manifest.json +++ b/manifest.json @@ -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": { diff --git a/pull_request_template.md b/pull_request_template.md index c10c82f..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -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!"* diff --git a/scripts/install b/scripts/install index 17c5af4..fb60486 100755 --- a/scripts/install +++ b/scripts/install @@ -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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7cfc140..72a477f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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.