Skip to content

Commit

Permalink
.travis: Convert TRAVIS_COMMIT_RANGE base...head to base..head
Browse files Browse the repository at this point in the history
Work around travis-ci/travis-ci#4596 until that is fixed upstream [1].
This avoids pulling in commits from the base tip that aren't reachable
from the head tip (e.g. if master has advanced since the PR branched
off, and the PR is against master).  We only want to check commits
that are in the head branch but not in the base branch (more details
on the range syntax in [2]).

Once the Travis bug does get fixed, the shell replacement will be a
no-op.  So we don't have to worry about checks breaking once the bug
gets fixed, and can periodically poll the bug and remove the
workaround at out leisure after the fix.

[1]: travis-ci/travis-ci#4596
[2]: http://git-scm.com/docs/gitrevisions#_specifying_ranges

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Oct 6, 2015
1 parent 3633d03 commit d815fa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -16,5 +16,5 @@ install: true
script:
- go vet -x ./...
- $HOME/gopath/bin/golint ./...
- $HOME/gopath/bin/git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE}

- echo "${TRAVIS_COMMIT_RANGE} -> ${TRAVIS_COMMIT_RANGE/.../..} (travis-ci/travis-ci#4596)"
- $HOME/gopath/bin/git-validation -run DCO,short-subject -v -range ${TRAVIS_COMMIT_RANGE/.../..}

0 comments on commit d815fa9

Please sign in to comment.