diff options
author | Artom Lifshitz <alifshit@redhat.com> | 2016-07-06 14:39:57 -0400 |
---|---|---|
committer | Artom Lifshitz <alifshit@redhat.com> | 2016-07-29 13:32:33 -0400 |
commit | 5ee95b324085bbbb7fbce3b4deb236a3e916a622 (patch) | |
tree | b556314fa1b00972d9b22fe42dca25759b7615f3 /tools | |
parent | 1e8d704678a44103ce611af77950166998558fa6 (diff) | |
download | nova-5ee95b324085bbbb7fbce3b4deb236a3e916a622.tar.gz |
Reminder that release notes are built from commits
This patch introduces a new tools/releasenotes_tox.sh script for the
tox -e releasenotes test environment. It will detect when there are
uncommitted release notes and print a reminder to commit them.
Change-Id: I54af12d7eb20b37263e23443900745884cffacea
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/releasenotes_tox.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/releasenotes_tox.sh b/tools/releasenotes_tox.sh new file mode 100755 index 0000000000..060aa5812f --- /dev/null +++ b/tools/releasenotes_tox.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +rm -rf releasenotes/build + +sphinx-build -a -E -W \ + -d releasenotes/build/doctrees \ + -b html \ + releasenotes/source releasenotes/build/html + +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} |