Skip to content

Commit

Permalink
small fix to the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Snellbaker committed Oct 11, 2017
1 parent 4a3768b commit 5b6571f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/check_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ trap finish EXIT ERR INT TERM
OUTPUT=`./scripts/coverage.sh`

while read -r LINE; do
echo -e "$LINE"
if [[ $LINE =~ "%" ]]; then
PERCENT=$(echo "$LINE"|cut -d: -f2-|cut -d% -f1|cut -d. -f1|tr -d ' ')
if [[ $PERCENT -lt 20 ]]; then
CHECKCOV=true
fi
fi
done < "$OUTPUT"
done <<< "$OUTPUT"

if $CHECKCOV; then
echo "Detected at least one package had less than 20% code coverage. Please review results below or from your terminal run ./scripts/coverage.sh --html for more detailed results"
Expand Down

0 comments on commit 5b6571f

Please sign in to comment.