From 388b38ac01358bd4a1093cfbe4f017b397047ca7 Mon Sep 17 00:00:00 2001 From: Christophe Siraut Date: Tue, 27 Feb 2018 16:16:19 +0100 Subject: [PATCH] publish_sphinx: cleanup before build (closes: #22101) --- publish.py | 1 + 1 file changed, 1 insertion(+) diff --git a/publish.py b/publish.py index d07be6d..691b4f3 100755 --- a/publish.py +++ b/publish.py @@ -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):