From 572eb54f16ae4b79be8f8d9d1abd2d8868d77bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 16 Mar 2021 08:32:14 +0100 Subject: [PATCH] Testing (#7) * Cleaning up --- README.md | 4 ++-- README_fr.md | 4 ++-- check_process | 1 - manifest.json | 18 +++--------------- pull_request_template.md | 4 +--- scripts/change_url | 1 + scripts/install | 5 ++--- scripts/upgrade | 8 +++++++- 8 files changed, 18 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 22a4c79..58291e0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Bludit for YunoHost [![Integration level](https://dash.yunohost.org/integration/bludit.svg)](https://dash.yunohost.org/appci/app/bludit) ![](https://ci-apps.yunohost.org/ci/badges/bludit.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bludit.maintain.svg) -[![Install Bludit with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=bludit) +[![Install Bludit with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bludit) *[Lire ce readme en français.](./README_fr.md)* @@ -27,7 +27,7 @@ Bludit is a web application to build your own website or blog in seconds; it's c ## Documentation * Official documentation: https://docs.bludit.com/en/ - * YunoHost documentation: https://yunohost.org/#/app_bludit + * YunoHost documentation: https://yunohost.org/en/app_bludit ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 3dd5d76..6537962 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Bludit pour YunoHost [![Integration level](https://dash.yunohost.org/integration/bludit.svg)](https://dash.yunohost.org/appci/app/bludit) ![](https://ci-apps.yunohost.org/ci/badges/bludit.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/bludit.maintain.svg) -[![Installer Bludit avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=bludit) +[![Installer Bludit avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=bludit) *[Read this readme in english.](./README.md)* @@ -27,7 +27,7 @@ Bludit est une application Web pour créer votre propre site Web ou blog en quel ## Documentation * Documentation officielle : https://docs.bludit.com/en/ -* Documentation YunoHost : https://yunohost.org/#/app_bludit_fr +* Documentation YunoHost : https://yunohost.org/fr/app_bludit ## Caractéristiques spécifiques YunoHost diff --git a/check_process b/check_process index c2dc531..c86af4a 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,6 @@ upgrade=1 backup_restore=1 multi_instance=1 - incorrect_path=1 port_already_use=0 change_url=1 ;;; Options diff --git a/manifest.json b/manifest.json index 6f993ce..8fb76b7 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Simple, Fast, Secure, Flat-File CMS", "fr": "CMS simple, rapide, sécurisé et à fichier plat" }, - "version": "3.13.1~ynh2", + "version": "3.13.1~ynh3", "url": "www.bludit.com", "license": "MIT", "maintainer": { @@ -14,41 +14,29 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ "nginx", - "php7.0-fpm" + "php7.3-fpm" ], "arguments": { "install" : [ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for Bludit", - "fr": "Choisissez un domaine pour Bludit" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Bludit", - "fr": "Choisissez un chemin pour Bludit" - }, "example": "/bludit", "default": "/bludit" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "If enabled, Bludit will be accessible by people who do not have an account. This can be changed later via the webadmin.", "fr": "Si cette case est cochée, Bludit 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 b5c5563..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/ttrss_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/ttrss_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/change_url b/scripts/change_url index 09545ca..61cba03 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS diff --git a/scripts/install b/scripts/install index 82a0fae..6893f55 100644 --- a/scripts/install +++ b/scripts/install @@ -44,7 +44,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 #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -90,12 +89,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 - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 7ebb002..d3ea5fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,7 +19,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) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -39,6 +38,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 #=================================================