publish_sphinx: cleanup before build (closes: #22101)

This commit is contained in:
Christophe Siraut 2018-02-27 16:16:19 +01:00
parent 39c33e876e
commit 388b38ac01
1 changed files with 1 additions and 0 deletions

View File

@ -166,6 +166,7 @@ def publish_sphinx(module):
checkout_dir = os.path.join(checkouts_directory, module.get('name'))
output_dir = os.path.join(web_directory, module.get('name'))
build_dir = os.path.join(checkout_dir, '_build/html')
os.system('rm -rf %s' % build_dir)
cmd = '%s/venv/bin/sphinx-build -b html -d _build/doctrees . _build/html' % os.getcwd()
os.system('cd %s && %s >/dev/null 2>&1' % (checkout_dir, cmd))
if os.path.isdir(output_dir):