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:
parent
50ba3733b1
commit
441a67f2f4
@ -65,6 +65,10 @@ these files come from.
|
|||||||
Release notes
|
Release notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
0.7
|
||||||
|
---
|
||||||
|
* Fix building of identity-api and image-api books.
|
||||||
|
|
||||||
0.6
|
0.6
|
||||||
---
|
---
|
||||||
* Fix python packaging bugs that prevented sitepackages usage and
|
* Fix python packaging bugs that prevented sitepackages usage and
|
||||||
|
@ -26,13 +26,14 @@ fi
|
|||||||
FILENAME=$1
|
FILENAME=$1
|
||||||
FILEPATH=`find ./ -regextype posix-extended -regex ".*${FILENAME}\.(md|markdown|mdown)"`
|
FILEPATH=`find ./ -regextype posix-extended -regex ".*${FILENAME}\.(md|markdown|mdown)"`
|
||||||
DIRPATH=`dirname $FILEPATH`
|
DIRPATH=`dirname $FILEPATH`
|
||||||
|
SOURCES=`ls $DIRPATH/*.md`
|
||||||
|
|
||||||
# Check for requirements
|
# Check for requirements
|
||||||
type -P pandoc > /dev/null 2>&1 || { echo >&2 "pandoc not installed. Aborting."; exit 1; }
|
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 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; }
|
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} - |\
|
xsltproc -o - ${DB_UPGRADE} - |\
|
||||||
xmllint --format - | \
|
xmllint --format - | \
|
||||||
sed -e "s,<article,<chapter xml:id=\"$FILENAME\"," | \
|
sed -e "s,<article,<chapter xml:id=\"$FILENAME\"," | \
|
||||||
|
@ -744,19 +744,22 @@ def build_book(book, publish_path):
|
|||||||
)
|
)
|
||||||
# Repository: identity-api
|
# Repository: identity-api
|
||||||
# Let's not check for "v3" but for the full name instead
|
# 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(
|
output = subprocess.check_output(
|
||||||
["markdown-docbook.sh", "identity-api-v3"],
|
["markdown-docbook.sh", "identity-api-v3"],
|
||||||
stderr=subprocess.STDOUT
|
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(
|
output = subprocess.check_output(
|
||||||
["mvn", "generate-sources", comments, release, "-B"],
|
["mvn", "generate-sources", comments, release, "-B"],
|
||||||
stderr=subprocess.STDOUT
|
stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
# Repository: image-api
|
# Repository: image-api
|
||||||
elif base_book == "openstack-image-service-api":
|
elif book.endswith('openstack-image-service-api/src/markdown'):
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
["markdown-docbook.sh", comments, release, "image-api-v2.0"],
|
["markdown-docbook.sh", "image-api-v2.0"],
|
||||||
stderr=subprocess.STDOUT
|
stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user