From 3091935fec9cb89fa8ffbd48ff8ea2f5ff8687f1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 28 Feb 2016 04:24:22 +1100 Subject: [PATCH] Docs: early exist build process on error Don't attempt to build docs when generation fails. --- doc/python_api/sphinx_doc_gen.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh index 8f1791d2195..697cd5a9b3f 100755 --- a/doc/python_api/sphinx_doc_gen.sh +++ b/doc/python_api/sphinx_doc_gen.sh @@ -54,7 +54,17 @@ SPHINXBASE=doc/python_api if $DO_EXE_BLENDER ; then # dont delete existing docs, now partial updates are used for quick builds. - $BLENDER_BIN --background -noaudio --factory-startup --python $SPHINXBASE/sphinx_doc_gen.py + $BLENDER_BIN \ + --background \ + -noaudio \ + --factory-startup \ + --python-exit-code 1 \ + --python $SPHINXBASE/sphinx_doc_gen.py + + if (($? == 1)) ; then + echo "Generating documentation failed, aborting" + exit 1 + fi fi