From ef5e5e02b490c4de3b0eb32bb678c4a714beab89 Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 12 Nov 2015 08:47:07 -0800 Subject: [PATCH] Only update docs from master branch on travis --- support/travis-build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/travis-build.py b/support/travis-build.py index e607c896..e9a3643b 100755 --- a/support/travis-build.py +++ b/support/travis-build.py @@ -3,7 +3,7 @@ from __future__ import print_function import errno, os, re, shutil, sys, tempfile, urllib -from subprocess import call, check_call, Popen, PIPE, STDOUT +from subprocess import call, check_call, check_output, Popen, PIPE, STDOUT def rmtree_if_exists(dir): try: @@ -17,6 +17,8 @@ if build == 'Doc': travis = 'TRAVIS' in os.environ # Install dependencies. if travis: + if check_output('git rev-parse --abbrev-ref HEAD', shell=True).strip() != 'master': + exit(0) # Ignore non-master branches check_call('curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | ' + 'sudo apt-key add -', shell=True) check_call('echo "deb https://deb.nodesource.com/node_0.10 precise main" | ' +