From a8d2687952ed681d406e061b49dcd5a9d04fb371 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 14 Mar 2021 23:11:20 +0100 Subject: [PATCH] Small fix --- README.md | 2 +- README_fr.md | 2 +- check_process | 3 --- manifest.json | 4 ++-- pull_request_template.md | 4 +--- scripts/install | 7 ++----- scripts/upgrade | 17 +++++++---------- 7 files changed, 14 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 49e16d4..bb7e308 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ How to configure this app: From an admin panel. ## Documentation * Official documentation: https://lycheeorg.github.io/docs/ - * YunoHost documentation: https://yunohost.org/#/app_lychee + * YunoHost documentation: https://yunohost.org/en/app_lychee ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 409011c..511ad63 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ Comment configurer cette application : via le panneau d'administration. ## Documentation * Documentation officielle : https://lycheeorg.github.io/docs/ - * Documentation YunoHost : https://yunohost.org/#/app_lychee_fr + * Documentation YunoHost : https://yunohost.org/fr/app_lychee ## Caractéristiques spécifiques YunoHost diff --git a/check_process b/check_process index 084364c..62cb4cb 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,6 @@ # See here for more information # https://github.com/YunoHost/package_check#syntax-check_process-file -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) @@ -18,7 +16,6 @@ upgrade=1 backup_restore=1 multi_instance=1 - port_already_use=0 change_url=1 ;;; Options Email= diff --git a/manifest.json b/manifest.json index e462363..a8dff1c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Photo-management-system to manage and share photos.", "fr": "Système de gestion de photos pour gérer et partager des photos." }, - "version": "4.0.8~ynh2", + "version": "4.0.8~ynh3", "url": "https://lycheeorg.github.io/", "license": "MIT", "maintainer": { @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">> 4.0.0" + "yunohost": ">> 4.1.7" }, "multi_instance": true, "services": [ diff --git a/pull_request_template.md b/pull_request_template.md index a7a17b4..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/lychee_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/lychee_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 33d3013..b9b174f 100755 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,6 @@ 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=is_public --value=$is_public #================================================= # CREATE A MYSQL DATABASE @@ -149,14 +148,12 @@ chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # 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 1d0067a..97451f1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) @@ -35,15 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=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) @@ -56,6 +46,13 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$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 #=================================================