publish.py: silence sphinx generation output

This commit is contained in:
root 2017-11-02 18:39:05 +01:00
parent edef2f0bf7
commit 49111c3922
1 changed files with 3 additions and 2 deletions

View File

@ -167,8 +167,9 @@ def publish_sphinx(module):
output_dir = os.path.join(web_directory, module.get('name'))
build_dir = os.path.join(checkout_dir, '_build/html')
cmd = '%s/venv/bin/sphinx-build -b html -d _build/doctrees . _build/html' % os.getcwd()
os.system('cd %s && %s' % (checkout_dir, cmd))
shutil.rmtree(output_dir)
os.system('cd %s && %s >/dev/null 2>&1' % (checkout_dir, cmd))
if os.path.isdir(output_dir):
shutil.rmtree(output_dir)
shutil.copytree(build_dir, output_dir)