mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #3652 from tianon/fix-travis-on-non-master-prs
Fix Travis for PRs against non-master (like release, for example)
This commit is contained in:
commit
3bd36157a1
2 changed files with 7 additions and 2 deletions
|
@ -13,8 +13,13 @@ before_script:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -qq python-yaml
|
- sudo apt-get install -qq python-yaml
|
||||||
- git remote add upstream git://github.com/dotcloud/docker.git
|
- git remote add upstream git://github.com/dotcloud/docker.git
|
||||||
- git fetch --append --no-tags upstream refs/heads/master:refs/remotes/upstream/master
|
- upstream=master;
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != false ]; then
|
||||||
|
upstream=$TRAVIS_BRANCH;
|
||||||
|
fi;
|
||||||
|
git fetch --append --no-tags upstream refs/heads/$upstream:refs/remotes/upstream/$upstream
|
||||||
# sometimes we have upstream master already as origin/master (PRs), but other times we don't, so let's just make sure we have a completely unambiguous way to specify "upstream master" from here out
|
# sometimes we have upstream master already as origin/master (PRs), but other times we don't, so let's just make sure we have a completely unambiguous way to specify "upstream master" from here out
|
||||||
|
# but if it's a PR against non-master, we need that upstream branch instead :)
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- hack/travis/dco.py
|
- hack/travis/dco.py
|
||||||
|
|
|
@ -6,7 +6,7 @@ if 'TRAVIS' not in os.environ:
|
||||||
exit(127)
|
exit(127)
|
||||||
|
|
||||||
if os.environ['TRAVIS_PULL_REQUEST'] != 'false':
|
if os.environ['TRAVIS_PULL_REQUEST'] != 'false':
|
||||||
commit_range = [os.environ['TRAVIS_BRANCH'], 'FETCH_HEAD']
|
commit_range = ['upstream/' + os.environ['TRAVIS_BRANCH'], 'FETCH_HEAD']
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
|
|
Loading…
Add table
Reference in a new issue