From aaa8a96a96ead22489336759cb3b9da1b0b526c7 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 8 Oct 2015 13:39:18 +0200 Subject: [PATCH] Use doc-tools-build-rst Update to openstack-doc-tools 0.31 and use doc-tools-build-rst file from that repo. Change-Id: Ie4a91aba59888f5a203e55ecd398e04513030e8b --- test-requirements.txt | 2 +- tools/build-all-rst.sh | 2 +- tools/build-rst.sh | 78 ------------------------------------------ 3 files changed, 2 insertions(+), 80 deletions(-) delete mode 100755 tools/build-rst.sh diff --git a/test-requirements.txt b/test-requirements.txt index ff62f54e..0e358c33 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,6 +3,6 @@ # process, which may cause wedges in the gate later. doc8 # Apache-2.0 -openstack-doc-tools>=0.30 +openstack-doc-tools>=0.31 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 openstackdocstheme>=1.2.3 diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh index 8cef630f..223b411e 100755 --- a/tools/build-all-rst.sh +++ b/tools/build-all-rst.sh @@ -2,5 +2,5 @@ mkdir -p publish-docs -tools/build-rst.sh security-guide --build build \ +doc-tools-build-rst security-guide --build build \ --target security-guide diff --git a/tools/build-rst.sh b/tools/build-rst.sh deleted file mode 100755 index c4b83830..00000000 --- a/tools/build-rst.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -xe -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -DIRECTORY=$1 - -if [ -z "$DIRECTORY" ] ; then - echo "usage $0 DIRECTORY options" - echo "Options are:" - echo "--glossary: Build glossary" - echo "--tag TAG: Use given tag for building" - echo "--target TARGET: Copy files to publish-docs/$TARGET" - echo "--build BUILD: Name of build directory" - exit 1 -fi - -GLOSSARY=0 -TARGET="" -TAG="" -TAG_OPT="" -BUILD="" - -while [[ $# > 1 ]] ; do - option="$1" - case $option in - --glossary) - GLOSSARY=1 - ;; - --tag) - TAG="$2" - TAG_OPT="-t $2" - shift - ;; - --target) - TARGET="$2" - shift - ;; - --build) - BUILD="$2" - shift - ;; - esac - shift -done - - -if [ "$GLOSSARY" -eq "1" ] ; then - echo "Generating Glossary" - tools/glossary2rst.py doc/common-rst/glossary.rst -fi - -if [ -z "$BUILD" ] ; then - if [ -z "$TAG" ] ; then - BUILD_DIR="$DIRECTORY/build/html" - else - BUILD_DIR="$DIRECTORY/build-${TAG}/html" - fi -else - BUILD_DIR="$DIRECTORY/$BUILD/html" -fi - -sphinx-build -E -W $TAG_OPT $DIRECTORY/source $BUILD_DIR - -# Copy RST -if [ "$TARGET" != "" ] ; then - mkdir -p publish-docs/$TARGET - rsync -a $BUILD_DIR/ publish-docs/$TARGET/ -fi