diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 669d00fe..bc3f2157 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -1,6 +1,11 @@ Release notes ============= +0.18.1 +------ +* Fix ``doc-tools-check-languages`` to handle all repositories and + setups. + 0.18 ---- diff --git a/bin/doc-tools-check-languages b/bin/doc-tools-check-languages index 93335073..7cf4e09d 100755 --- a/bin/doc-tools-check-languages +++ b/bin/doc-tools-check-languages @@ -18,7 +18,7 @@ function setup_directories { language=$1 for directory in ${DIRECTORIES["$language"]} ; do echo " $directory" - openstack-generate-docbook -l $language -b $directory + openstack-generate-docbook -l $language -b $directory -r $DOC_DIR done } @@ -29,7 +29,9 @@ function setup_language { echo "=======================" echo " Directories:" setup_directories $language - cp doc/pom.xml generated/$language/pom.xml + if [ -n "$POM_FILE" ] ; then + cp $POM_FILE generated/$language/pom.xml + fi } @@ -47,7 +49,7 @@ function test_language { args+=("--publish") fi args+=("--check-build" "-l $language") - for book in "${BOOKS["$language"]}"; do + for book in ${BOOKS["$language"]}; do args+=("--only-book $book") done @@ -90,7 +92,8 @@ fi source $CONF_FILE if [[ -z $(declare -p BOOKS 2> /dev/null | grep 'declare -A BOOKS') || \ - -z $(declare -p DIRECTORIES 2> /dev/null | grep 'declare -A DIRECTORIES') ]]; then + -z $(declare -p DIRECTORIES 2> /dev/null | grep 'declare -A DIRECTORIES') || \ + -z $DOC_DIR ]]; then echo "Error: the configuration file '$CONF_FILE' is invalid" exit 1 fi diff --git a/bin/doc-tools-check-languages.conf b/bin/doc-tools-check-languages.conf index b7501149..1b91ac4e 100644 --- a/bin/doc-tools-check-languages.conf +++ b/bin/doc-tools-check-languages.conf @@ -1,13 +1,20 @@ # Example configuration for the languages 'ja' and 'fr'. -# directories to be set up +# Directories to set up declare -A DIRECTORIES=( ["ja"]="common glossary high-availability-guide image-guide install-guide user-guide user-guide-admin" ["fr"]="common glossary user-guide" ) -# books to be built +# Books to build declare -A BOOKS=( ["ja"]="high-availability-guide image-guide install-guide user-guide user-guide-admin" ["fr"]="user-guide" ) + +# Where does the top-level pom live? +# Set to empty to not copy it. +POM_FILE=doc/pom.xml + +# Location of doc dir +DOC_DIR="doc/"