travis: scancode check log instead

Fix to properly evaluate the findings - read the logs to get how many files there are reported.
pull/12529/head
Martin Kojtal 2020-02-27 17:01:08 +00:00
parent 2d93a4578d
commit 3c441eb763
1 changed files with 2 additions and 3 deletions

View File

@ -77,13 +77,12 @@ matrix:
after_success:
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json
- cat scancode-evaluate.log
- retval=$?
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
- |
if [ $retval == 0 ]; then
if [ $COUNT == 0 ]; then
echo "License check OK";
else
echo "License check failed, please review license issues found";
COUNT=$(cat scancode-evaluate.log | grep File: | wc -l)
STATUSM="Needs review, ${COUNT} license issues found";
set_status "success" "$STATUSM";
fi