travis: Allow travis builds to access target branches
Because travis builds only fetch a single branch (master) by default, test-commit-message.sh only had access to commits in the master branch. In order to fetch the correct branch for our build, we need to run 'git config remote.origin.fetch..' with the target branch's information before executing git fetch on the repo in before_install. Now git will always fetch the appropriate branch.
This commit is contained in:
@@ -8,6 +8,7 @@ sudo: true
|
||||
dist: trusty
|
||||
before_install:
|
||||
- sudo apt update
|
||||
- git config remote.origin.fetch +refs/heads/${TRAVIS_BRANCH}:refs/remotes/origin/${TRAVIS_BRANCH}
|
||||
- git fetch --unshallow
|
||||
install: 'make deps'
|
||||
script: 'make test'
|
||||
|
||||
Reference in New Issue
Block a user