tripleo-common/tools/releasenotes_tox.sh
Emilien Macchi a09c6b46a1 Add ReNo support
Add ReNo support to manage release notes.
http://docs.openstack.org/developer/reno/

Change-Id: If21fc6e7b1702c14a28beced5b77bfaee676e313
2017-01-12 12:06:02 +00:00

29 lines
599 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}