Skip to content

Commit 66e9cfe

Browse files
datapythonistajreback
authored andcommitted
DOC: Making the build fail if the doc build fails (#24292)
1 parent ca85a41 commit 66e9cfe

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ before_script:
112112
script:
113113
- echo "script start"
114114
- source activate pandas-dev
115-
- ci/run_build_docs.sh
115+
- ci/build_docs.sh
116116
- ci/run_tests.sh
117117

118118
after_script:

ci/build_docs.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
set -e
4+
35
if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
46
echo "not doing build_docs on non-linux"
57
exit 0

ci/run_build_docs.sh

-10
This file was deleted.

doc/make.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ def _run_os(*args):
214214
# TODO check_call should be more safe, but it fails with
215215
# exclude patterns, needs investigation
216216
# subprocess.check_call(args, stderr=subprocess.STDOUT)
217-
os.system(' '.join(args))
217+
exit_status = os.system(' '.join(args))
218+
if exit_status:
219+
msg = 'Command "{}" finished with exit code {}'
220+
raise RuntimeError(msg.format(' '.join(args), exit_status))
218221

219222
def _sphinx_build(self, kind):
220223
"""Call sphinx to build documentation.

0 commit comments

Comments
 (0)