nova/tools/releasenotes_tox.sh
Matt Riedemann 1e0b2b5822 Fix busted release notes
A bad release note slipped through because the bash script
wasn't returing the actual results. This fixes the script
and the busted release note.

Change-Id: Id32557f34121fe82fac21d089e4117a72ff585e5
Closes-Bug: #1610312
2016-08-05 12:14:19 -04: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}