From e7dcdea0809e6f959dba6087289abe95e160bac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyfzhao=E2=80=9D?= <“dsware@126.com”> Date: Mon, 21 May 2018 17:23:21 +0800 Subject: [PATCH] Fix releasenotes build in tox This patch is to ensure the old files are not left over when running these document builds. Change-Id: I2941a006fd44447931cfde63af7da26363e3a352 --- doc/doc-contrib-guide/source/api-guides.rst | 5 +++-- doc/doc-contrib-guide/source/project-deploy-guide.rst | 5 ++++- doc/doc-contrib-guide/source/project-install-guide.rst | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/doc/doc-contrib-guide/source/api-guides.rst b/doc/doc-contrib-guide/source/api-guides.rst index 7da5077592..eb677c2c1f 100644 --- a/doc/doc-contrib-guide/source/api-guides.rst +++ b/doc/doc-contrib-guide/source/api-guides.rst @@ -154,9 +154,10 @@ The basic steps are: [testenv:api-ref] # This environment is called from CI scripts to test and publish # the API Ref to developer.openstack.org. + whitelist_externals = rm commands = - rm -rf api-ref/build - sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html + rm -rf api-ref/build + sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html #. Test the ``tox.ini`` changes by running this tox command: diff --git a/doc/doc-contrib-guide/source/project-deploy-guide.rst b/doc/doc-contrib-guide/source/project-deploy-guide.rst index 3c4735883a..69531cb641 100644 --- a/doc/doc-contrib-guide/source/project-deploy-guide.rst +++ b/doc/doc-contrib-guide/source/project-deploy-guide.rst @@ -50,7 +50,10 @@ Setting up .. code-block:: ini [testenv:deploy-guide] - commands = sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html + whitelist_externals = rm + commands = + rm -rf deploy-guide/build + sphinx-build -a -E -W -d deploy-guide/build/doctrees -b html deploy-guide/source deploy-guide/build/html #. Add your deployment guide content, and test the build locally with ``tox``: diff --git a/doc/doc-contrib-guide/source/project-install-guide.rst b/doc/doc-contrib-guide/source/project-install-guide.rst index c5cd3d8e1a..709109652e 100644 --- a/doc/doc-contrib-guide/source/project-install-guide.rst +++ b/doc/doc-contrib-guide/source/project-install-guide.rst @@ -77,7 +77,10 @@ Set up project specific installation guides: .. code-block:: ini [testenv:install-guide] - commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html + whitelist_externals = rm + commands = + rm -rf install-guide/build + sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html #. Add the python package ``openstackdocstheme`` to the ``test-requirements.txt`` file. Copy the exact requirement line from the