travis: Ignore doc changes when building a PR

Fixes #1441
This commit is contained in:
Florian Bruhin 2016-04-20 22:35:02 +02:00
parent 391900cc99
commit eeb830e040
2 changed files with 9 additions and 2 deletions

View File

@ -22,8 +22,15 @@
import sys import sys
import subprocess import subprocess
import os
code = subprocess.call(['git', '--no-pager', 'diff', '--exit-code', '--stat']) code = subprocess.call(['git', '--no-pager', 'diff', '--exit-code', '--stat'])
if os.environ.get('TRAVIS_PULL_REQUEST', 'false') != 'false':
if code != 0:
print("Docs changed but ignoring change as we're building a PR")
sys.exit(0)
if code != 0: if code != 0:
print() print()
print('The autogenerated docs changed, please run this to update them:') print('The autogenerated docs changed, please run this to update them:')

View File

@ -190,13 +190,13 @@ commands =
basepython = python3 basepython = python3
skip_install = true skip_install = true
whitelist_externals = git whitelist_externals = git
passenv = passenv = TRAVIS_PULL_REQUEST
deps = deps =
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = commands =
{envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/src2asciidoc.py {posargs} {envpython} scripts/dev/src2asciidoc.py {posargs}
{envpython} scripts/dev/check_doc_changes.py {envpython} scripts/dev/check_doc_changes.py {posargs}
{envpython} scripts/asciidoc2html.py {posargs} {envpython} scripts/asciidoc2html.py {posargs}
[testenv:cxfreeze-windows] [testenv:cxfreeze-windows]