lint: Fix gitlint checking commits in master but not in the branch.

This was causing a bunch of spurious failures.

Workaround for https://github.com/travis-ci/travis-ci/issues/4596 ;
TRAVIS_COMMIT_RANGE is actually just totally wrong for this purpose.
This commit is contained in:
Tim Abbott 2017-04-25 16:50:16 -07:00
parent 8fb9d2bff3
commit faf47fe147
1 changed files with 4 additions and 3 deletions

View File

@ -5,10 +5,11 @@
# The rules can be found in /.gitlint
if [ $TRAVIS ]; then
range=$TRAVIS_COMMIT_RANGE
if [ "$TRAVIS" ]; then
# Work around https://github.com/travis-ci/travis-ci/issues/4596
range="${TRAVIS_COMMIT_RANGE/.../..}"
else
range="upstream/master...HEAD"
range="upstream/master..HEAD"
fi
gitlint --commits $range