Merge pull request #12529 from 0xc0170/fix_scancode_ret

travis: scancode ret value not cat fix
pull/12463/head
Martin Kojtal 2020-03-03 15:55:47 +00:00 committed by GitHub
commit 32e8b2f7d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -77,13 +77,14 @@ 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";
STATUSM="All licenses OK";
set_status "success" "$STATUSM";
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