From 8c1ffef59d7fcc11dc66cb29950107da71c5d3fa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 11:37:01 +0100 Subject: [PATCH] Cleaning up --- README.md | 2 +- README_fr.md | 2 +- check_process | 1 - manifest.json | 16 ++-------------- pull_request_template.md | 4 +--- scripts/install | 3 +-- scripts/upgrade | 17 +++++++---------- 7 files changed, 13 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index b1613db..ac8bb32 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Mindmaps is a HTML5 based mind mapping application. It lets you create neat look ## Documentation * Official documentation: Link to the official documentation of this app - * YunoHost documentation: https://yunohost.org/#/app_mindmaps + * YunoHost documentation: https://yunohost.org/en/app_mindmaps ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 299269c..846028d 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,7 +24,7 @@ Mindmaps est une application de mind mapping basée sur HTML5. Il vous permet de ## Documentation * Documentation officielle : Lien vers la documentation officielle de cette application. - * Documentation YunoHost : https://yunohost.org/#/app_mindmaps_fr + * Documentation YunoHost : https://yunohost.org/fr/app_mindmaps ## Caractéristiques spécifiques YunoHost diff --git a/check_process b/check_process index 255c7cf..859438d 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,6 @@ upgrade=1 backup_restore=1 multi_instance=0 - incorrect_path=1 port_already_use=0 change_url=1 ;;; Levels diff --git a/manifest.json b/manifest.json index 34741a8..a951605 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Tool for making mind maps", "fr": "Outil de creation de cartes mentales" }, - "version": "0.0.20201010~ynh1", + "version": "0.0.20201010~ynh2", "url": "https://www.mindmaps.app/", "license": "AGPL-3.0", "maintainer": { @@ -15,7 +15,7 @@ "url": "" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ @@ -26,29 +26,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Mindmaps", - "fr": "Choisissez un nom de domaine pour Mindmaps" - }, "example": "example.com" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Mindmaps", - "fr": "Choisissez un chemin pour Mindmaps" - }, "example": "/mindmaps", "default": "/mindmaps" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "If enabled, Mindmaps will be accessible by people who doesn’t have an account. This can be changed later via the webadmin.", "fr": "Si cette case est cochée, Mindmaps sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." diff --git a/pull_request_template.md b/pull_request_template.md index 62c2fd2..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/mindmaps_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/mindmaps_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 14e6d2b..2d59c80 100755 --- a/scripts/install +++ b/scripts/install @@ -42,7 +42,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 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 #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -74,7 +73,7 @@ chown -R root: $final_path ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" +[ $is_public -eq 0 ] || ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index f635bc6..e87321b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME 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) #================================================= @@ -31,21 +30,19 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=2 -# 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 final_path doesn't exist, create it if [ -z $final_path ]; then final_path=/var/www/$app 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 #=================================================