mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Parsing du log plus rapide
This commit is contained in:
parent
26c123b2f2
commit
44f9e95348
2 changed files with 6 additions and 22 deletions
|
@ -613,7 +613,7 @@ TEST_RESULTS () {
|
|||
then
|
||||
# If the app have been picked from github, check if this app was under the YunoHost-Apps organisation
|
||||
# YEP17 will be equal to 1 if the app was under the YunoHost-Apps organisation
|
||||
YEP17=$(echo "$app_arg" | grep --count "github.com/YunoHost-Apps/")
|
||||
YEP17=$(echo "$app_arg" | grep --ignore-case --count "github.com/YunoHost-Apps/")
|
||||
[ $YEP17 -eq 1 ] || ECHO_FORMAT "This app doesn't respect the YEP 1.7 ! (https://yunohost.org/#/packaging_apps_guidelines_fr)\n" "red"
|
||||
fi
|
||||
|
||||
|
|
|
@ -103,27 +103,11 @@ LOG_EXTRACTOR () {
|
|||
> "$temp_result"
|
||||
# Duplicate the part of the yunohost log into the complete log.
|
||||
cat "$temp_log" >> "$complete_log"
|
||||
while read log_read_line
|
||||
do
|
||||
if echo "$log_read_line" | grep --quiet " ERROR "
|
||||
then
|
||||
# Copy in the temporary result file all logged error
|
||||
echo -n ">ERROR: " >> "$temp_result"
|
||||
echo "$log_read_line" | sed 's/^.* ERROR *//' >> "$temp_result"
|
||||
fi
|
||||
if echo "$log_read_line" | grep --quiet "yunohost.*: error:"
|
||||
then
|
||||
# Also copy the moulinette errors
|
||||
echo -n ">ERROR: " >> "$temp_result"
|
||||
echo "$log_read_line" >> "$temp_result"
|
||||
fi
|
||||
if echo "$log_read_line" | grep --quiet " WARNING "
|
||||
then
|
||||
# And all logged warning
|
||||
echo -n ">WARNING: " >> "$temp_result"
|
||||
echo "$log_read_line" | sed 's/^.* WARNING *//' >> "$temp_result"
|
||||
fi
|
||||
done < "$temp_log"
|
||||
# Find all errors and warnings in the log file
|
||||
grep --extended-regexp " ERROR | WARNING |yunohost.*: error:" "$temp_log" >> "$temp_result"
|
||||
sed -i 's/^.* ERROR */>ERROR: /' "$temp_result"
|
||||
sed -i 's/^.* WARNING */>WARNING: /' "$temp_result"
|
||||
|
||||
CLEAR_LOG # Remove all knew useless warning lines.
|
||||
PARSE_LOG # Print all errors and warning found in the log.
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue