Browse Source

Fix doc-tools-check-language

Fix quoting so strings are split.
Add config variables so that api-site repository can be used.

Change-Id: I345e6a8557ad91c8a5941139873cd2c23a27f199
changes/55/114655/4 0.18.1
Andreas Jaeger 7 years ago
parent
commit
edb4ff4998
3 changed files with 21 additions and 6 deletions
  1. +5
    -0
      RELEASE_NOTES.rst
  2. +7
    -4
      bin/doc-tools-check-languages
  3. +9
    -2
      bin/doc-tools-check-languages.conf

+ 5
- 0
RELEASE_NOTES.rst View File

@ -1,6 +1,11 @@
Release notes
=============
0.18.1
------
* Fix ``doc-tools-check-languages`` to handle all repositories and
setups.
0.18
----


+ 7
- 4
bin/doc-tools-check-languages View File

@ -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


+ 9
- 2
bin/doc-tools-check-languages.conf View File

@ -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/"

Loading…
Cancel
Save