tripleo-ha-utils/ci-scripts/releasenotes_tox.sh
Gael Chamoulaud e0df5f7108 Add ReNo support for managing release notes in TripleO-Quickstart-Extras
Add ReNo [1] support to manage release notes
[1] - http://docs.openstack.org/developer/reno/

Change-Id: Ief133240354404d9abdc40e05bb1696c13a6b606
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-02-07 12:19:28 +01:00

28 lines
598 B
Bash
Executable File

#!/usr/bin/env bash
rm -rf releasenotes/build
sphinx-build -a -E -W \
-d releasenotes/build/doctrees \
-b html \
releasenotes/source releasenotes/build/html
BUILD_RESULT=$?
UNCOMMITTED_NOTES=$(git status --porcelain | \
awk '$1 == "M" && $2 ~ /releasenotes\/notes/ {print $2}')
if [ "${UNCOMMITTED_NOTES}" ]
then
cat <<EOF
REMINDER: The following changes to release notes have not been committed:
${UNCOMMITTED_NOTES}
While that may be intentional, keep in mind that release notes are built from
committed changes, not the working directory.
EOF
fi
exit ${BUILD_RESULT}