From 987b7aaf5c67b0662158367f1b31cbf9d56c76da Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sat, 15 Jul 2017 18:50:11 -0400 Subject: [PATCH] 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 --- tools/build-all-rst.sh | 8 +------- tools/build-install-guides-rst.sh | 2 +- tools/publishdocs.sh | 30 ------------------------------ 3 files changed, 2 insertions(+), 38 deletions(-) diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh index 219f01dcba..f4ce589ca4 100755 --- a/tools/build-all-rst.sh +++ b/tools/build-all-rst.sh @@ -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 diff --git a/tools/build-install-guides-rst.sh b/tools/build-install-guides-rst.sh index 9cec28d5cb..14e8523507 100755 --- a/tools/build-install-guides-rst.sh +++ b/tools/build-install-guides-rst.sh @@ -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 diff --git a/tools/publishdocs.sh b/tools/publishdocs.sh index b2cdee04c9..e93ed71304 100755 --- a/tools/publishdocs.sh +++ b/tools/publishdocs.sh @@ -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