tox: Keeping going with docs

Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Id4ba8fdf54276ce53601337b3006728724831084
This commit is contained in:
gujin 2019-11-01 14:30:28 +08:00
parent d1d3f5d015
commit 9daf7e3299
2 changed files with 8 additions and 4 deletions

View File

@ -3,6 +3,7 @@
# process, which may cause wedges in the gate later.
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
openstackdocstheme==1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0

View File

@ -15,12 +15,15 @@ commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -b html doc/source doc/build/html
whitelist_externals = rm
commands =
rm -fr doc/build
sphinx-build --keep-going -b html doc/source doc/build/html
[testenv:deploy-guide]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
whitelist_externals = rm
commands =
rm -rf deploy-guide/build
sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html
rm -rf deploy-guide/build
sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html