1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Fix linter

This commit is contained in:
ericgaspar 2021-03-15 22:36:42 +01:00
parent b1247f5df2
commit 170f6ab93d
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 16 additions and 32 deletions

View file

@ -14,7 +14,7 @@
"email": "apps@yunohost.org" "email": "apps@yunohost.org"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.0.0" "yunohost": ">= 4.1.7"
}, },
"previous_maintainers": [{ "previous_maintainers": [{
"name": "mbugeia", "name": "mbugeia",
@ -35,38 +35,22 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for Kanboard",
"fr": "Choisissez un nom de domaine pour Kanboard"
},
"example": "domain.org" "example": "domain.org"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for Kanboard",
"fr": "Choisissez un chemin pour Kanboard"
},
"example": "/kanboard", "example": "/kanboard",
"default": "/kanboard" "default": "/kanboard"
}, },
{ {
"name": "admin", "name": "admin",
"type": "user", "type": "user",
"ask": {
"en": "Choose the admin user",
"fr": "Choisissez l'administrateur"
},
"example": "johndoe" "example": "johndoe"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"default": false "default": false
} }
] ]

View file

@ -11,14 +11,6 @@
- [ ] Upgrade from last version tested. - [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested. - [ ] Can be reviewed and tested.
## Validation ## Package_check results
--- ---
*Minor decision* * 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!"*
- **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.

View file

@ -101,10 +101,18 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Configuring Kanboard..." ynh_script_progression --message="Configuring Kanboard..."
# Copy and edit config.php # Retrieve admin email
config_php="$final_path/config.php" 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 # DATABASE INITIALIZATION
@ -153,7 +161,7 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=2
# Make app public or private # Make app public or private
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then 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('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('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" ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$config_php"

View file

@ -173,7 +173,7 @@ ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=2
# Make app public or private # Make app public or private
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then 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('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('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" ynh_replace_string --match_string="define('REMEMBER_ME_AUTH'.*$" --replace_string="define('REMEMBER_ME_AUTH', true);" --target_file="$config_php"