Docs: early exist build process on error
authorCampbell Barton <ideasman42@gmail.com>
Sat, 27 Feb 2016 17:24:22 +0000 (04:24 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 27 Feb 2016 17:25:11 +0000 (04:25 +1100)
Don't attempt to build docs when generation fails.

doc/python_api/sphinx_doc_gen.sh

index 8f1791d21955447d096fdd2c82682b8affa086ab..697cd5a9b3f7a3630dc1e706fd08d9dc8872ff74 100755 (executable)
@@ -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