Add environments to build install guides individually

Change-Id: I0741098b99c4d05cb38cf38a604f549f21a49916
This commit is contained in:
Christian Berendt 2015-09-12 21:39:55 +02:00
parent 75d1dbd161
commit 721139f880
2 changed files with 25 additions and 5 deletions

View File

@ -2,6 +2,8 @@
mkdir -p publish-docs
TAGS=${1:-obs rdo ubuntu debian}
LINKCHECK=""
if [[ $# > 0 ]] ; then
if [ "$1" = "--linkcheck" ] ; then
@ -15,7 +17,7 @@ title_org=$(grep "title::" doc/install-guide/source/index.rst | \
trap "sed -i -e \"s/\.\. title::.*/.. title:: ${title_org}/\" \
doc/install-guide/source/index.rst" EXIT
for tag in obs rdo ubuntu debian; do
for tag in $TAGS; do
GLOSSARY=""
if [[ ! -e doc/common-rst/glossary.rst ]] ; then
GLOSSARY="--glossary"
@ -28,8 +30,10 @@ for tag in obs rdo ubuntu debian; do
tools/build-rst.sh doc/install-guide \
$GLOSSARY --tag ${tag} --target "draft/install-guide-${tag}" \
$LINKCHECK
done
# Debian uses index-debian, rename it.
mv publish-docs/draft/install-guide-debian/index-debian.html \
publish-docs/draft/install-guide-debian/index.html
# Debian uses index-debian, rename it.
if [[ "$tag" == "debian" ]]; then
mv publish-docs/draft/install-guide-debian/index-debian.html \
publish-docs/draft/install-guide-debian/index.html
fi
done

16
tox.ini
View File

@ -52,6 +52,22 @@ commands =
commands =
{toxinidir}/tools/build-install-guides-rst.sh
[testenv:install-guide-debian]
commands =
{toxinidir}/tools/build-install-guides-rst.sh debian
[testenv:install-guide-obs]
commands =
{toxinidir}/tools/build-install-guides-rst.sh obs
[testenv:install-guide-rdo]
commands =
{toxinidir}/tools/build-install-guides-rst.sh rdo
[testenv:install-guide-ubuntu]
commands =
{toxinidir}/tools/build-install-guides-rst.sh ubuntu
[testenv:publishdocs]
# Prepare all documents (except www subdir) so that they can get
# published on docs.openstack.org with just copying publish-docs/*