Add root-marker file to translated manuals

This is needed for publishing in the future:
This is so that we can create a list of directories to ignore when we
rsync documentation builds to a publishing site. Some builds are
published as subdirectories underneath the results of superior
builds.

This allows those superior builds to be rsynced without removing the
other builds that were published under them.

http://specs.openstack.org/openstack-infra/infra-specs/specs/doc-publishing.html

Change-Id: Ic8773caebecafa87b10c1ad4612bde6b1513b667
This commit is contained in:
Andreas Jaeger 2016-09-16 09:45:09 +02:00
parent 559ff6df40
commit 54aa873505
2 changed files with 27 additions and 10 deletions

View File

@ -16,6 +16,10 @@ BUILD_FAIL=0
INSTALL_TAGS="obs rdo ubuntu debian debconf"
FIRSTAPP_TAGS="libcloud dotnet fog openstacksdk pkgcloud shade"
# This marker is needed for Infra publishing and needs to go into the
# root directory of each translated manual as file ".root-marker".
MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID"
function build_rst {
language=$1
book=$2
@ -93,9 +97,10 @@ function build_rst {
-d ${DOCTREES}
${DOC_DIR}${book}/source/ \
${BUILD_DIR}"
mkdir -p publish-docs/${language}/${book}-${tag}
rsync -a ${DOC_DIR}${book}/build-${tag}/html/ \
publish-docs/${language}/${book}-${tag}
PUBLISH_DIR=publish-docs/${language}/${book}-${tag}
mkdir -p ${PUBLISH_DIR}
rsync -a ${DOC_DIR}${book}/build-${tag}/html/ ${PUBLISH_DIR}
echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
done
elif [ ${book} = "install-guide" ] ; then
# Install Guide has several variations, build all of them
@ -122,9 +127,11 @@ function build_rst {
-d ${DOCTREES}
${DOC_DIR}${book}-${tag}/source/ \
${BUILD_DIR}"
mkdir -p publish-docs/${language}/${book}-${tag}
PUBLISH_DIR=publish-docs/${language}/${book}-${tag}
mkdir -p ${PUBLISH_DIR}
rsync -a ${DOC_DIR}${book}-${tag}/build-${tag}/html/ \
publish-docs/${language}/${book}-${tag}
${PUBLISH_DIR}
echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
else
##
# Because Sphinx uses the first heading as title regardless of
@ -148,9 +155,11 @@ function build_rst {
-d ${DOCTREES}
${DOC_DIR}${book}/source/ \
${BUILD_DIR}"
mkdir -p publish-docs/${language}/${book}-${tag}
PUBLISH_DIR=publish-docs/${language}/${book}-${tag}
mkdir -p ${PUBLISH_DIR}
rsync -a ${DOC_DIR}${book}/build-${tag}/html/ \
publish-docs/${language}/${book}-${tag}
${PUBLISH_DIR}
echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
fi
done
else
@ -161,9 +170,10 @@ function build_rst {
-d ${DOCTREES} \
${DOC_DIR}${book}/source/ \
${BUILD_DIR}"
mkdir -p publish-docs/${language}/${book}/
rsync -a ${DOC_DIR}${book}/build/html/ \
publish-docs/${language}/${book}/
PUBLISH_DIR=publish-docs/${language}/${book}/
mkdir -p ${PUBLISH_DIR}
rsync -a ${DOC_DIR}${book}/build/html/ ${PUBLISH_DIR}
echo $MARKER_TEXT > ${PUBLISH_DIR}/.root-marker
fi
# Remove newly created files
git clean -f -q ${LOCALE_DIR}${language}/LC_MESSAGES/*.po

View File

@ -0,0 +1,7 @@
other:
- |
For translated manuals, the command ``doc-tools-check-languages``
now places a marker file in the root of each directory. This
marker file is needed for proper publishing in the OpenStack CI
environment. For details, see
http://specs.openstack.org/openstack-infra/infra-specs/specs/doc-publishing.html.