741d59c459
Publishing to a top-level directory has a few challenges with some new infra scripts. Let's keep those simple and change from publish-docs to publish-docs/html. Depends-On: https://review.opendev.org/676489 Change-Id: I94b7bf915c0fdad0e9e2f5dd81846f45dc99194a
48 lines
1.2 KiB
Bash
Executable File
48 lines
1.2 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
mkdir -p publish-docs/html
|
|
|
|
# Set this to a sensible value if not set by OpenStack CI.
|
|
if [ -z "$ZUUL_BRANCH" ] ; then
|
|
ZUUL_BRANCH="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_BRANCH Build: $ZUUL_UUID Revision: $ZUUL_NEWREF"
|
|
|
|
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=( 'image-guide' \
|
|
'install-guide')
|
|
|
|
for guide in doc-contrib-guide glossary \
|
|
api-quick-start 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_BRANCH" = "master" ] ; then
|
|
echo $MARKER_TEXT > publish-docs/html/.root-marker
|
|
fi
|