Skip to content

Commit 32e8b2f

Browse files
authored
Merge pull request #12529 from 0xc0170/fix_scancode_ret
travis: scancode ret value not cat fix
2 parents 6e6603f + 92711bd commit 32e8b2f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,14 @@ matrix:
7777
after_success:
7878
- python ./tools/test/travis-ci/scancode-evaluate.py -f scancode.json
7979
- cat scancode-evaluate.log
80-
- retval=$?
80+
- COUNT=$(cat scancode-evaluate.log | grep 'File:' | wc -l)
8181
- |
82-
if [ $retval == 0 ]; then
82+
if [ $COUNT == 0 ]; then
8383
echo "License check OK";
84+
STATUSM="All licenses OK";
85+
set_status "success" "$STATUSM";
8486
else
8587
echo "License check failed, please review license issues found";
86-
COUNT=$(cat scancode-evaluate.log | grep File: | wc -l)
8788
STATUSM="Needs review, ${COUNT} license issues found";
8889
set_status "success" "$STATUSM";
8990
fi

0 commit comments

Comments
 (0)