publish from master to the working site

Publish changes to this repo directly from the master branch to the
working site. Do not move changes into a "draft" folder before
publishing.

"Docs like code"

Change-Id: Iac54bd70ec587ba27019f5377dcf99a3c9460dcb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-07-15 18:50:11 -04:00
parent fed641fe66
commit 987b7aaf5c
3 changed files with 2 additions and 38 deletions

View File

@ -47,7 +47,7 @@ done
# This includes guides that we publish from stable branches
# as versioned like the ha-guide
for guide in ha-guide-draft; do
TARGET="draft/$guide"
TARGET="$guide"
if [[ ${PDF_TARGETS[*]} =~ $guide ]]; then
tools/build-rst.sh doc/$guide --build build \
--target "$TARGET" $LINKCHECK $PDF_OPTION
@ -55,12 +55,6 @@ for guide in ha-guide-draft; do
tools/build-rst.sh doc/$guide --build build \
--target "$TARGET" $LINKCHECK
fi
# For stable branches, we need to mark the specific guides.
# TODO(jaegerandi): Enable for stable branches after branch is
# created:
#if [ "$ZUUL_REFNAME" != "master" ] ; then
# echo $MARKER_TEXT > publish-docs/draft/$TARGET/.root-marker
#fi
done
tools/build-install-guides-rst.sh $LINKCHECK $PDF_OPTION

View File

@ -31,4 +31,4 @@ MARKER_TEXT="Project: $ZUUL_PROJECT Ref: $ZUUL_REFNAME Build: $ZUUL_UUID Revisio
# Build the guide
tools/build-rst.sh doc/install-guide \
--target "draft/install-guide" $LINKCHECK $PDF_OPTION
--target "install-guide" $LINKCHECK $PDF_OPTION

View File

@ -19,30 +19,6 @@ if [[ -z "$PUBLISH" ]] ; then
exit 1
fi
# Copy files from draft to named branch and replace all links from
# draft with links to the branch
function copy_to_branch {
BRANCH=$1
if [ -e publish-docs/draft ] ; then
# Copy files over
mkdir -p publish-docs/$BRANCH
cp -a publish-docs/draft/* publish-docs/$BRANCH/
# We don't need this file
rm -f publish-docs/$BRANCH/draft-index.html
# We don't need these draft guides on the branch
rm -rf publish-docs/$BRANCH/arch-design-to-archive
for f in $(find publish-docs/$BRANCH -name "atom.xml"); do
sed -i -e "s|/draft/|/$BRANCH/|g" $f
done
for f in $(find publish-docs/$BRANCH -name "*.html"); do
sed -i -e "s|/draft/|/$BRANCH/|g" $f
done
fi
}
mkdir -p publish-docs
# Build all RST guides including PDF files
@ -66,12 +42,6 @@ if [ "$PUBLISH" = "publish" ] ; then
rm publish-docs/www-index.html
fi
# For publishing to both /draft and /BRANCH
#if [ "$PUBLISH" = "publish" ] ; then
# # For publishing to both /draft and /BRANCH
# copy_to_branch ocata
#fi
if [ "$PUBLISH" = "build" ] ; then
# Create index page for viewing
openstack-indexpage publish-docs