From 170f6ab93d0802797712f3f0c1ecf5f035f31f7e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 22:36:42 +0100 Subject: [PATCH] Fix linter --- manifest.json | 18 +----------------- pull_request_template.md | 12 ++---------- scripts/install | 16 ++++++++++++---- scripts/upgrade | 2 +- 4 files changed, 16 insertions(+), 32 deletions(-) diff --git a/manifest.json b/manifest.json index 55b259d..16a038e 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "apps@yunohost.org" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "previous_maintainers": [{ "name": "mbugeia", @@ -35,38 +35,22 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain name for Kanboard", - "fr": "Choisissez un nom de domaine pour Kanboard" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for Kanboard", - "fr": "Choisissez un chemin pour Kanboard" - }, "example": "/kanboard", "default": "/kanboard" }, { "name": "admin", "type": "user", - "ask": { - "en": "Choose the admin user", - "fr": "Choisissez l'administrateur" - }, "example": "johndoe" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "default": false } ] diff --git a/pull_request_template.md b/pull_request_template.md index cde4a25..0a198cf 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -11,14 +11,6 @@ - [ ] Upgrade from last version tested. - [ ] Can be reviewed and tested. -## Validation +## Package_check results --- -*Minor decision* -- **Upgrade previous version** : -- [ ] **Code review** : -- [ ] **Approval (LGTM)** : -- [ ] **Approval (LGTM)** : -- **CI succeeded** : -[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/kanboard_ynh%20PR-NUM-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/kanboard_ynh%20PR-NUM-/) -*Please replace '-NUM-' in this link by the PR number.* -When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. +* 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 c7f2713..2333b50 100644 --- a/scripts/install +++ b/scripts/install @@ -101,10 +101,18 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Configuring Kanboard..." -# Copy and edit config.php -config_php="$final_path/config.php" +# Retrieve admin email +email=$(ynh_user_get_info --username=$admin --key=mail) -ynh_add_config --template="../conf/config.php" --destination="$config_php" +# Copy and edit config.php +config_php="${final_path}/config.php" + +cp ../conf/config.php "$config_php" +ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config_php" +ynh_replace_string --match_string="__DB_NAME__" --replace_string=$db_name --target_file="$config_php" +ynh_replace_string --match_string="__USER__" --replace_string=$admin --target_file="$config_php" +ynh_replace_string --match_string="__EMAIL__" --replace_string=$email --target_file="$config_php" +ynh_replace_string --match_string="__DOMAIN__" --replace_string=$domain --target_file="$config_php" #================================================= # DATABASE INITIALIZATION @@ -153,7 +161,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=2 # Make app public or private if [ $is_public -eq 1 ] then - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" + ynh_permission_update --permission="main" --add="visitors" ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$config_php" ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$config_php" ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$config_php" diff --git a/scripts/upgrade b/scripts/upgrade index e4a37dd..d137cc1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -173,7 +173,7 @@ ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2 # Make app public or private if [ $is_public -eq 1 ] then - ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" + ynh_permission_update --permission="main" --add="visitors" ynh_replace_string --match_string="define('LDAP_AUTH'.*$" --replace_string="define('LDAP_AUTH', true);" --target_file="$config_php" ynh_replace_string --match_string="define('HIDE_LOGIN_FORM'.*$" --replace_string="define('HIDE_LOGIN_FORM', false);" --target_file="$config_php" ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$config_php"