From c2cac00294c4192a9a68162789aacff20b51a07c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 29 May 2015 14:09:00 +0200 Subject: [PATCH] Cleanup builds Remove separate build-user-guides.sh and create a new build-all-rst.sh tool. Remove networking tox environment, since the RST guides share files, we should always build them together using the docs tox environment. Change-Id: I7ef98ca5e134096e14c79d58b0fc62a07747e471 --- tools/build-all-rst.sh | 18 ++++++++++++++++++ tools/build-user-guides.sh | 6 ------ tools/publishdocs.sh | 15 ++------------- tox.ini | 8 +------- 4 files changed, 21 insertions(+), 26 deletions(-) create mode 100755 tools/build-all-rst.sh delete mode 100755 tools/build-user-guides.sh diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh new file mode 100755 index 0000000000..b5b28888ea --- /dev/null +++ b/tools/build-all-rst.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e + +mkdir -p publish-docs + +GLOSSARY="--glossary" + +for guide in user-guide user-guide-admin networking-guide; do + tools/build-rst.sh doc/$guide $GLOSSARY --build build \ + --target $guide + # Build it only the first time + GLOSSARY="" +done + +# Draft guides +for guide in admin-guide-cloud-rst; do + tools/build-rst.sh doc/$guide --build build \ + --target "draft/$guide" +done diff --git a/tools/build-user-guides.sh b/tools/build-user-guides.sh deleted file mode 100755 index 711cfc0689..0000000000 --- a/tools/build-user-guides.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -e - -tools/build-rst.sh doc/user-guide --glossary --build build -# No need to build the glossary again here. -tools/build-rst.sh doc/user-guide-admin --build build -tools/build-rst.sh doc/admin-guide-cloud-rst --build build diff --git a/tools/publishdocs.sh b/tools/publishdocs.sh index 67653b181d..f69b601703 100755 --- a/tools/publishdocs.sh +++ b/tools/publishdocs.sh @@ -43,19 +43,8 @@ function copy_to_branch { mkdir -p publish-docs -GLOSSARY="--glossary" -for guide in user-guide user-guide-admin networking-guide; do - tools/build-rst.sh doc/$guide $GLOSSARY --build build \ - --target $guide - # Build it only the first time - GLOSSARY="" -done - -# Draft guides -for guide in admin-guide-cloud-rst; do - tools/build-rst.sh doc/$guide --build build \ - --target "draft/$guide" -done +# Build all RST guides +tools/build-all-rst.sh # Build the www pages so that openstack-doc-test creates a link to # www/www-index.html. diff --git a/tox.ini b/tox.ini index 164509411f..7b5d8253db 100644 --- a/tox.ini +++ b/tox.ini @@ -42,13 +42,7 @@ commands = [testenv:docs] commands = - {toxinidir}/tools/build-user-guides.sh - sphinx-build -W doc/networking-guide/source doc/networking-guide/build/html - -[testenv:network] -commands = - {toxinidir}/tools/glossary2rst.py doc/common-rst/glossary.rst - sphinx-build -W doc/networking-guide/source doc/networking-guide/build/html + {toxinidir}/tools/build-all-rst.sh [testenv:publishdocs] # Prepare all documents (except www subdir) so that they can get