openstack-manuals/tools/build-all-rst.sh
Alexandra Settle 85107272be [contrib-guide] Updating url to doc-contrib-guide
Based off conversation at the PTG, we agreed it would be
beneficial to ensure the contrib-guide is clearly marked
as the doc contrib guide outside of the title.

This change includes a redirect.

Change-Id: I5abf915f0b94a482afa961e6b86364c26aae5d79
2017-09-22 14:57:47 +00:00

50 lines
1.3 KiB
Bash
Executable File

#!/bin/bash -e
mkdir -p publish-docs
# Set this to a sensible value if not set by OpenStack CI.
if [ -z "$ZUUL_REFNAME" ] ; then
ZUUL_REFNAME="master"
fi
# This marker is needed for infra publishing.
# Note for stable branches, this needs to be the top of each manual.
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID Revision: $ZUUL_NEWREV"
LINKCHECK=""
PDF_OPTION=""
while [[ $# > 0 ]] ; do
option="$1"
case $option in
--linkcheck)
LINKCHECK="--linkcheck"
;;
--pdf)
PDF_OPTION="--pdf"
;;
esac
shift
done
# PDF targets for Install guides are dealt in build-install-guides-rst.sh
PDF_TARGETS=( 'arch-design'\
'ha-guide' \
'image-guide' \
'install-guide')
for guide in arch-design doc-contrib-guide glossary \
ha-guide ha-guide-draft image-guide install-guide; do
if [[ ${PDF_TARGETS[*]} =~ $guide ]]; then
tools/build-rst.sh doc/$guide --build build \
--target $guide $LINKCHECK $PDF_OPTION
else
tools/build-rst.sh doc/$guide --build build \
--target $guide $LINKCHECK
fi
done
# For master, just mark the root
if [ "$ZUUL_REFNAME" = "master" ] ; then
echo $MARKER_TEXT > publish-docs/.root-marker
fi