Don't try updating cppformat.github.io without permissions

This commit is contained in:
vitaut 2015-06-04 12:52:42 -07:00
parent d311927c64
commit 99edb141ec

View File

@ -32,8 +32,13 @@ if build == 'Doc':
sys.path.insert(0, os.path.join(cppformat_dir, 'doc')) sys.path.insert(0, os.path.join(cppformat_dir, 'doc'))
import build import build
html_dir = build.build_docs() html_dir = build.build_docs()
# Clone the cppformat.github.io repo.
repo = 'cppformat.github.io' 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) rmtree_if_exists(repo)
git_url = 'https://github.com/' if travis else 'git@github.com:' git_url = 'https://github.com/' if travis else 'git@github.com:'
check_call(['git', 'clone', git_url + 'cppformat/{}.git'.format(repo)]) check_call(['git', 'clone', git_url + 'cppformat/{}.git'.format(repo)])