Merge "Make root-marker generation more robust"
This commit is contained in:
commit
8055e4d21a
@ -2,6 +2,15 @@
|
||||
|
||||
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=""
|
||||
if [[ $# > 0 ]] ; then
|
||||
if [ "$1" = "--linkcheck" ] ; then
|
||||
@ -16,6 +25,7 @@ PDF_TARGETS=( 'arch-design' 'arch-design-draft' 'cli-reference'\
|
||||
'ha-guide' 'networking-guide'\
|
||||
'ops-guide' 'user-guide' )
|
||||
|
||||
# Note that these guides are only build for master branch
|
||||
for guide in admin-guide arch-design cli-reference contributor-guide \
|
||||
ha-guide image-guide ops-guide user-guide; do
|
||||
if [[ ${PDF_TARGETS[*]} =~ $guide ]]; then
|
||||
@ -38,11 +48,15 @@ for guide in networking-guide arch-design-draft config-reference; do
|
||||
tools/build-rst.sh doc/$guide --build build \
|
||||
--target "draft/$guide" $LINKCHECK
|
||||
fi
|
||||
# For stable branches, we need to mark the specific guides.
|
||||
if [ "$ZUUL_REFNAME" != "master" ] ; then
|
||||
echo $MARKER_TEXT > publish-docs/draft/$guide/.root-marker
|
||||
fi
|
||||
done
|
||||
|
||||
tools/build-install-guides-rst.sh $LINKCHECK
|
||||
|
||||
# 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"
|
||||
# For master, just mark the root
|
||||
if [ "$ZUUL_REFNAME" = "master" ] ; then
|
||||
echo $MARKER_TEXT > publish-docs/.root-marker
|
||||
fi
|
||||
|
@ -22,12 +22,22 @@ fi
|
||||
cp -f ${INDEX} ${INDEX}.save
|
||||
trap "mv -f ${INDEX}.save ${INDEX}" EXIT
|
||||
|
||||
# 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"
|
||||
|
||||
for tag in $TAGS; do
|
||||
TARGET="draft/install-guide-${tag}"
|
||||
if [[ "$tag" == "debconf" ]]; then
|
||||
# Build the guide with debconf
|
||||
# To use debian only contents, use "debian" tag.
|
||||
tools/build-rst.sh doc/install-guide-debconf \
|
||||
--tag debian --target "draft/install-guide-${tag}" $LINKCHECK --pdf
|
||||
--tag debian --target "$TARGET" $LINKCHECK --pdf
|
||||
else
|
||||
##
|
||||
# Because Sphinx uses the first heading as title regardless of
|
||||
@ -40,6 +50,10 @@ for tag in $TAGS; do
|
||||
|
||||
# Build the guide
|
||||
tools/build-rst.sh doc/install-guide \
|
||||
--tag ${tag} --target "draft/install-guide-${tag}" $LINKCHECK --pdf
|
||||
--tag ${tag} --target "$TARGET" $LINKCHECK --pdf
|
||||
fi
|
||||
# Add this for stable branches
|
||||
if [ "$ZUUL_REFNAME" != "master" ] ; then
|
||||
echo $MARKER_TEXT > publish-docs/$TARGET/.root-marker
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user