Skip to content

Commit

Permalink
Fix branch detection on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Nov 23, 2015
1 parent 4118b89 commit 7f3f4d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion support/travis-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def rmtree_if_exists(dir):
travis = 'TRAVIS' in os.environ
# Install dependencies.
if travis:
check_call(['git', 'branch'])
branch = check_output('git rev-parse --abbrev-ref HEAD', shell=True).strip()
if branch != 'master':
if not branch.endswith('/master'):
print('Branch: ' + branch)
exit(0) # Ignore non-master branches
check_call('curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | ' +
Expand Down

0 comments on commit 7f3f4d8

Please sign in to comment.