Fix gating of identity and image apis

The handling of markdown documents was broken.

markdown is now setup correctly in building books.

We also follow the same logic as the identity-api in concatenating all
books together.

Change-Id: I8ae3cb4891199b81389142ea29060134cebc4194
This commit is contained in:
Andreas Jaeger 2014-02-08 20:21:22 +01:00
parent 50ba3733b1
commit 441a67f2f4
3 changed files with 12 additions and 4 deletions

View File

@ -65,6 +65,10 @@ these files come from.
Release notes
=============
0.7
---
* Fix building of identity-api and image-api books.
0.6
---
* Fix python packaging bugs that prevented sitepackages usage and

View File

@ -26,13 +26,14 @@ fi
FILENAME=$1
FILEPATH=`find ./ -regextype posix-extended -regex ".*${FILENAME}\.(md|markdown|mdown)"`
DIRPATH=`dirname $FILEPATH`
SOURCES=`ls $DIRPATH/*.md`
# Check for requirements
type -P pandoc > /dev/null 2>&1 || { echo >&2 "pandoc not installed. Aborting."; exit 1; }
type -P xsltproc > /dev/null 2>&1 || { echo >&2 "xsltproc not installed. Aborting."; exit 1; }
type -P xmllint > /dev/null 2>&1 || { echo >&2 "xmllint not installed. Aborting."; exit 1; }
pandoc -f markdown -t docbook -s ${FILEPATH} |\
pandoc -f markdown -t docbook -s ${SOURCES} |\
xsltproc -o - ${DB_UPGRADE} - |\
xmllint --format - | \
sed -e "s,<article,<chapter xml:id=\"$FILENAME\"," | \

View File

@ -744,19 +744,22 @@ def build_book(book, publish_path):
)
# Repository: identity-api
# Let's not check for "v3" but for the full name instead
elif base_book.endswith("openstack-identity-api/v3"):
elif book.endswith("openstack-identity-api/v3"):
output = subprocess.check_output(
["markdown-docbook.sh", "identity-api-v3"],
stderr=subprocess.STDOUT
)
# File gets generated at wrong directory, we need to move it
# around
shutil.move("src/markdown/identity-api-v3.xml", ".")
output = subprocess.check_output(
["mvn", "generate-sources", comments, release, "-B"],
stderr=subprocess.STDOUT
)
# Repository: image-api
elif base_book == "openstack-image-service-api":
elif book.endswith('openstack-image-service-api/src/markdown'):
output = subprocess.check_output(
["markdown-docbook.sh", comments, release, "image-api-v2.0"],
["markdown-docbook.sh", "image-api-v2.0"],
stderr=subprocess.STDOUT
)
output = subprocess.check_output(