From 9b0c74008a88539e3c490a94b48f0572ed64e99e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 12 Nov 2016 19:24:01 +0100 Subject: [PATCH] Set up stable/newton branch Set up stable/branch properly: * Disable all non-translated and non-versioned guides for translation. * Only build backported guides (install-guide, config-reference, networking-guide). * Publish backported guides and their translations to /newton/. * Do not publish web pages. * Update .gitreview for the branch. Change-Id: I9e0729bafda930bc80e5c68b8e4cf15e7cb050ca --- .gitreview | 1 + doc-tools-check-languages.conf | 20 +++++++-------- tools/build-all-rst.sh | 15 +++++------ tools/build-install-guides-rst.sh | 4 +-- tools/publishdocs.sh | 41 ++++++++++++++++--------------- tox.ini | 6 ++++- 6 files changed, 47 insertions(+), 40 deletions(-) diff --git a/.gitreview b/.gitreview index 683ae9206a..511bc2bc72 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,4 @@ host=review.openstack.org port=29418 project=openstack/openstack-manuals.git +defaultbranch=stable/newton diff --git a/doc-tools-check-languages.conf b/doc-tools-check-languages.conf index fd478ce3a3..581ac50f51 100644 --- a/doc-tools-check-languages.conf +++ b/doc-tools-check-languages.conf @@ -7,10 +7,10 @@ declare -A BOOKS=( ["cs"]="install-guide" ["de"]="install-guide" ["fr"]="install-guide" - ["id"]="install-guide user-guide" - ["ja"]="ha-guide image-guide install-guide networking-guide ops-guide user-guide" + ["id"]="install-guide" + ["ja"]="install-guide networking-guide" ["ko_KR"]="install-guide" - ["zh_CN"]="install-guide user-guide" + ["zh_CN"]="install-guide" ) # draft books @@ -19,7 +19,7 @@ declare -A DRAFTS=( ["de"]="install-guide" ["fr"]="install-guide" ["id"]="install-guide" - ["ja"]="ha-guide install-guide networking-guide ops-guide" + ["ja"]="install-guide" ["ko_KR"]="install-guide" ["zh_CN"]="install-guide" ) @@ -37,14 +37,14 @@ DOC_DIR="doc/" declare -A SPECIAL_BOOKS=( # This needs special handling, handle it with the RST tools. ["common"]="RST" - ["admin-guide"]="RST" - ["arch-design"]="RST" - ["ha-guide"]="RST" - ["image-guide"]="RST" + ["admin-guide"]="skip" + ["arch-design"]="skip" + ["ha-guide"]="skip" + ["image-guide"]="skip" ["install-guide"]="RST" ["networking-guide"]="RST" - ["ops-guide"]="RST" - ["user-guide"]="RST" + ["ops-guide"]="skip" + ["user-guide"]="skip" # Do not translate for now, we need to fix our scripts first to # generate the content properly. ["install-guide-debconf"]="skip" diff --git a/tools/build-all-rst.sh b/tools/build-all-rst.sh index 32c42a639d..bca204efd4 100755 --- a/tools/build-all-rst.sh +++ b/tools/build-all-rst.sh @@ -9,18 +9,19 @@ if [[ $# > 0 ]] ; then fi fi -for guide in admin-guide arch-design cli-reference contributor-guide \ - ha-guide image-guide ops-guide user-guide; do - tools/build-rst.sh doc/$guide --build build \ - --target $guide $LINKCHECK -done +# Do not build for stable/newton, these are only published from master +#for guide in admin-guide arch-design cli-reference contributor-guide \ +# ha-guide image-guide ops-guide user-guide; do +# tools/build-rst.sh doc/$guide --build build \ +# --target $guide $LINKCHECK +#done # Draft guides # This includes guides that we publish from stable branches # as versioned like the networking-guide. -for guide in networking-guide arch-design-draft config-reference; do +for guide in networking-guide config-reference; do tools/build-rst.sh doc/$guide --build build \ - --target "draft/$guide" $LINKCHECK + --target "newton/$guide" $LINKCHECK done tools/build-install-guides-rst.sh $LINKCHECK diff --git a/tools/build-install-guides-rst.sh b/tools/build-install-guides-rst.sh index 1904780fc3..cb4bf85a47 100755 --- a/tools/build-install-guides-rst.sh +++ b/tools/build-install-guides-rst.sh @@ -27,7 +27,7 @@ for tag in $TAGS; do # 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 + --tag debian --target "newton/install-guide-${tag}" $LINKCHECK else ## # Because Sphinx uses the first heading as title regardless of @@ -40,6 +40,6 @@ for tag in $TAGS; do # Build the guide tools/build-rst.sh doc/install-guide \ - --tag ${tag} --target "draft/install-guide-${tag}" $LINKCHECK + --tag ${tag} --target "newton/install-guide-${tag}" $LINKCHECK fi done diff --git a/tools/publishdocs.sh b/tools/publishdocs.sh index 5c0b28e1dd..663965d94a 100755 --- a/tools/publishdocs.sh +++ b/tools/publishdocs.sh @@ -51,27 +51,28 @@ tools/build-all-rst.sh # Build the www pages so that openstack-indexpage creates a link to # www/www-index.html. -if [ "$PUBLISH" = "build" ] ; then - python tools/www-generator.py --source-directory www/ \ - --output-directory publish-docs/www/ - rsync -a www/static/ publish-docs/www/ - # publish-docs/www-index.html is the trigger for openstack-indexpage - # to include the file. - mv publish-docs/www/www-index.html publish-docs/www-index.html -fi -if [ "$PUBLISH" = "publish" ] ; then - python tools/www-generator.py --source-directory www/ \ - --output-directory publish-docs - rsync -a www/static/ publish-docs/ - # Don't publish this file - rm publish-docs/www-index.html -fi +# Disabled for stable/newton +# if [ "$PUBLISH" = "build" ] ; then +# python tools/www-generator.py --source-directory www/ \ +# --output-directory publish-docs/www/ +# rsync -a www/static/ publish-docs/www/ +# # publish-docs/www-index.html is the trigger for openstack-indexpage +# # to include the file. +# mv publish-docs/www/www-index.html publish-docs/www-index.html +# fi +# if [ "$PUBLISH" = "publish" ] ; then +# python tools/www-generator.py --source-directory www/ \ +# --output-directory publish-docs +# rsync -a www/static/ publish-docs/ +# # Don't publish this file +# 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 newton -fi +# # For publishing to both /draft and /BRANCH +# if [ "$PUBLISH" = "publish" ] ; then +# # For publishing to both /draft and /BRANCH +# copy_to_branch newton +# fi if [ "$PUBLISH" = "build" ] ; then # Create index page for viewing diff --git a/tox.ini b/tox.ini index 541d6c5f4f..8432e00101 100644 --- a/tox.ini +++ b/tox.ini @@ -98,9 +98,13 @@ commands = # in the venv. Since it's installed in the system, let's # use sitepackages. sitepackages=True -whitelist_externals = doc-tools-check-languages +whitelist_externals = + doc-tools-check-languages + mv commands = doc-tools-check-languages doc-tools-check-languages.conf publish all + # Manually move files around + mv publish-docs/draft publish-docs/mitaka [testenv:generatepot-rst] # Generate POT files for translation, needs {posargs} like: