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 subprocess
import os
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:
print()
print('The autogenerated docs changed, please run this to update them:')

View File

@ -190,13 +190,13 @@ commands =
basepython = python3
skip_install = true
whitelist_externals = git
passenv =
passenv = TRAVIS_PULL_REQUEST
deps =
-r{toxinidir}/requirements.txt
commands =
{envpython} scripts/link_pyqt.py --tox {envdir}
{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}
[testenv:cxfreeze-windows]