Skip to content

Commit

Permalink
docs: Add exitcode to build docs
Browse files Browse the repository at this point in the history
python setup.py docs was not giving proper exitcodes.
Added exit code so that circle ci fails if the docs are
not built correctly.

Fixes coala#259
  • Loading branch information
vivek425ster committed Mar 21, 2016
1 parent 69dfba4 commit 0a99c06
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ class BuildDocsCommand(setuptools.command.build_py.build_py):
make_command = ('make', '-C', 'docs', 'html', 'SPHINXOPTS=-W')

def run(self):
call(self.apidoc_command)
call(self.make_command)
err_no = call(self.apidoc_command)
if not err_no:
err_no = call(self.make_command)
sys.exit(err_no)


with open('requirements.txt') as requirements:
Expand Down

0 comments on commit 0a99c06

Please sign in to comment.