From 99edb141ec3cd71eaa797c3b1bb09954a43c657e Mon Sep 17 00:00:00 2001 From: vitaut Date: Thu, 4 Jun 2015 12:52:42 -0700 Subject: [PATCH] Don't try updating cppformat.github.io without permissions --- support/travis-build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/support/travis-build.py b/support/travis-build.py index 6c256614..e607c896 100755 --- a/support/travis-build.py +++ b/support/travis-build.py @@ -32,8 +32,13 @@ if build == 'Doc': sys.path.insert(0, os.path.join(cppformat_dir, 'doc')) import build html_dir = build.build_docs() - # Clone the cppformat.github.io repo. repo = 'cppformat.github.io' + if travis and 'KEY' not in os.environ: + # Don't update the repo if building on Travis from an account that doesn't + # have push access. + print('Skipping update of ' + repo) + exit(0) + # Clone the cppformat.github.io repo. rmtree_if_exists(repo) git_url = 'https://github.com/' if travis else 'git@github.com:' check_call(['git', 'clone', git_url + 'cppformat/{}.git'.format(repo)])