From 5e726b9094301900fa3fb606cd191cf157f59206 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 6 Mar 2019 12:43:28 +0100 Subject: [PATCH] Force all levels to auto --- README-fr.md | 34 +++++----------------------------- README.md | 35 +++++------------------------------ check_process | 10 +--------- package_check.sh | 24 +++++++++++++----------- 4 files changed, 24 insertions(+), 79 deletions(-) diff --git a/README-fr.md b/README-fr.md index 3577415..a34ea57 100644 --- a/README-fr.md +++ b/README-fr.md @@ -76,16 +76,7 @@ package_check/package_check.sh APP_ynh port_already_use=1 (XXXX) change_url=1 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=0 Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 ;;; Options Email= Notification=none @@ -133,27 +124,12 @@ Si un test est absent de la liste, il sera ignoré. Cela revient à le noter à - `change_url`: Test le script change_url de 6 manières différentes, Root vers un path, path vers un autre path et path vers root. Et la même chose avec un autre domaine. ### `;;; Levels` -Permet de choisir comment [chaque niveau](https://yunohost.org/#/packaging_apps_levels_fr) est déterminé. -Chaque niveau fixé à *auto* sera déterminé par le script. Il est également possible de fixer le niveau à *1* ou à *0* pour respectivement le valider ou l'invalider. -Il est à noter que les niveaux 4, 8, 9 et 10 ne peuvent être fixés à *auto* car ils ne peuvent être testés par le script et nécessitent une vérification manuelle. Il est toutefois possible de les fixer à *na* pour indiquer que le niveau n'est pas applicable (par exemple pour le niveau 4 quand une app ne propose pas de SSO LDAP). Un niveau *na* sera tout simplement ignoré dans le calcul du niveau final. -Pour le forçage des niveaux, merci d’ajouter, avant la déclaration du niveau, un commentaire contenant un lien vers un ticket qui explique pourquoi le niveau a été forcé. -Comme : -``` -# https://github.com/YunoHost-Apps/$app_ynh/issues/5 -Level 4=1 -``` - -- Niveau 1 : L'application s'installe et se désinstalle correctement. -- Peut être vérifié par package_check -- Niveau 2 : L'application s'installe et se désinstalle dans toutes les configurations communes. -- Peut être vérifié par package_check -- Niveau 3 : L'application supporte l'upgrade depuis une ancienne version du package. -- Peut être vérifié par package_check -- Niveau 4 : L'application prend en charge de LDAP et/ou HTTP Auth. -- Doit être vérifié manuellement -- Niveau 5 : Aucune erreur dans package_linter. -- Peut être vérifié par package_check -- Niveau 6 : L'application peut-être sauvegardée et restaurée sans erreurs sur la même machine ou une autre. -- Peut être vérifié par package_check -- Niveau 7 : Aucune erreur dans package check. -- Peut être vérifié par package_check -- Niveau 8 : L'application respecte toutes les YEP recommandées. -- Doit être vérifié manuellement -- Niveau 9 : L'application respecte toutes les YEP optionnelles. -- Doit être vérifié manuellement -- Niveau 10 : L'application est jugée parfaite. -- Doit être vérifié manuellement +Les [niveaux](https://yunohost.org/#/packaging_apps_levels_fr) 1 à 7 sont déterminés automatiquement. +A l'exception du niveau 5, vous ne pouvez plus forcer une valeur pour un niveau. +Le niveau 5 est déterminé par les résultats de [package linter](https://github.com/YunoHost/package_linter). +La valeur par défaut pour ce niveau est `auto`, cependant, si nécessaire, vous pouvez forcer la valeur pour ce niveau en la fixant à `1`, pour un résultat positif, ou à `0`, pour un résultat négatif. +Si vous le faites, veuillez ajouter un commentaire pour justifier pourquoi vous forcez ce niveau. ### `;;; Options` Options supplémentaires disponible dans le check_process. diff --git a/README.md b/README.md index 212e901..23ca1b1 100644 --- a/README.md +++ b/README.md @@ -76,16 +76,7 @@ package_check/package_check.sh APP_ynh port_already_use=1 (XXXX) change_url=1 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=0 Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 ;;; Options Email= Notification=none @@ -133,27 +124,11 @@ If a test is not in the list, it will be ignored. It's similar to marked at 0. - `change_url`: Try to change the url by 6 different way. Root to path, path to another path and path to root. And the same thing, with another domain. ### `;;; Levels` -Allow to choose how [each level](https://yunohost.org/#/packaging_apps_levels_fr) is determined -Each level at *auto* will be determinate by the script. It's also possible to fixate the level at *1* or *0* to respectively validate or invalidate it. -The level 4, 8, 9 and 10 shouldn't be fixed at *auto*, because they don't be tested by the script and they need a manuel check. However, it's allowed to force them at *na* to inform that a level is not applicable (example for the level 4 when a app not permit to use SSO or LDAP). A level at *na* will be ignored in the sum of final level. - -For levels forced, please add a comment before the level containing a link toward a ticket explaining why this level have been forced. -Like : -``` -# https://github.com/YunoHost-Apps/$app_ynh/issues/5 -Level 4=1 -``` - -- Level 1 : The application installs and uninstalls correctly. -- Can be checked by package_check -- Level 2 : The application installs and uninstalls correctly in all standard configurations. -- Can be checked by package_check -- Level 3 : The application may upgrade from an old version. -- Can be checked by package_check -- Level 4 : The application manages LDAP and/or HTTP Auth. -- Must be validated manually -- Level 5 : No errors with package_linter. -- Can be checked by package_check -- Level 6 : The application may be saved and restored without any errors on the same server or an another. -- Can be checked by package_check -- Level 7 : No errors with package check. -- Can be checked by package_check -- Level 8 : The application respects all recommended YEP. -- Must be validated manually -- Level 9 : The application respects all optionnal YEP. -- Must be validated manually -- Level 10 : The application has judged as perfect. -- Must be validated manually +From [levels](https://yunohost.org/#/packaging_apps_levels_fr) 1 to 7, levels are determined automatically. +Except for the level 5, you can't force a value for a level anymore. +The level 5 is determined by the results of [package linter](https://github.com/YunoHost/package_linter). +The default value for this level is `auto`, however, if needed, you can force the value for this level by setting it at `1`, for a positive result, or at `0`, for a negative one. +If you do so, please add a comment to justify why you force this level. ### `;;; Options` Supplementary options available in the check_process. diff --git a/check_process b/check_process index bd0968b..0d51c25 100644 --- a/check_process +++ b/check_process @@ -27,16 +27,8 @@ port_already_use=1 (66) change_url=0 ;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto - Level 4=0 + # If the level 5 (Package linter) is forced to 1. Please add justifications here. Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 ;;; Options Email= Notification=none diff --git a/package_check.sh b/package_check.sh index 079de9c..291634d 100755 --- a/package_check.sh +++ b/package_check.sh @@ -559,19 +559,21 @@ TEST_RESULTS () { # 1 -> If this level is forced. Even if the tests fails # 2 -> Indicates the tests had previously validated this level # auto -> This level has not a value yet. - # na -> This level will not checked, but it'll be ignored in the final sum + # na -> This level will not be checked, but it'll be ignored in the final sum - # Set default values for level, if they're empty. - test -n "${level[1]}" || level[1]=auto - test -n "${level[2]}" || level[2]=auto - test -n "${level[3]}" || level[3]=auto - test -n "${level[4]}" || level[4]=auto + # Set default values for level. + # All levels are forced to default values. Except the level 5. + level[1]=auto + level[2]=auto + level[3]=auto + level[4]=auto + # Level 5 can have a value forced into the check_process test -n "${level[5]}" || level[5]=auto - test -n "${level[6]}" || level[6]=auto - test -n "${level[7]}" || level[7]=auto - test -n "${level[8]}" || level[8]=0 - test -n "${level[9]}" || level[9]=0 - test -n "${level[10]}" || level[10]=0 + level[6]=auto + level[7]=auto + level[8]=0 + level[9]=0 + level[10]=0 # Check if the level can be changed level_can_change () {