Merge pull request #83 from YunoHost/integrate-levels-list

Integrate level list directly into package_check
This commit is contained in:
Alexandre Aubin 2020-11-06 01:05:43 +01:00 committed by GitHub
commit baaa79d09c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

11
levels.list Normal file
View file

@ -0,0 +1,11 @@
0 Broken
1 Installable
2 Installable in all situations
3 Can be updated
4 Backup and restore support
5 Clean
6 Open to contributions from the community
7 Successfully pass functional tests
8 High quality app
9 Respect higher guidelines
10 Package assessed as perfect

View file

@ -264,9 +264,6 @@ rm "$script_dir/pcheck.lock"
exec "$script_dir/package_check.sh" "${arguments[@]}" exec "$script_dir/package_check.sh" "${arguments[@]}"
EOF EOF
# Get the last version of app_levels/en.json
wget -nv https://raw.githubusercontent.com/YunoHost/apps/master/app_levels/en.json -O "$script_dir/levels.json"
# Give the execution right # Give the execution right
chmod +x "$script_dir/upgrade_script.sh" chmod +x "$script_dir/upgrade_script.sh"
@ -856,7 +853,7 @@ TEST_RESULTS () {
# Then, print the levels # Then, print the levels
# Print the global level # Print the global level
verbose_level=$(grep applevel_$global_level\" "$script_dir/levels.json" | cut -d'"' -f4) verbose_level=$(grep "^$global_level " "$script_dir/levels.list" | cut -c4-)
ECHO_FORMAT "Level of this application: $global_level ($verbose_level)\n" "white" "bold" ECHO_FORMAT "Level of this application: $global_level ($verbose_level)\n" "white" "bold"