summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2017-10-09 20:58:00 +0100
committerStephen Finucane <sfinucan@redhat.com>2017-10-10 09:36:59 +0100
commitf450cd26a29e85573697cdd9fdc8279ef0fe8aed (patch)
treef69c5096e7a290910003fe838760b4d60dc75f0f /tools
parentc45687fb9b9fa541ceb47e5f9069c4628943ba2d (diff)
downloadpbr-f450cd26a29e85573697cdd9fdc8279ef0fe8aed.tar.gz
Add reno for release notes management
Change-Id: I36b8193b22123a409b729c7b9f4309507379f1ad
Diffstat (limited to 'tools')
-rwxr-xr-xtools/tox_releasenotes.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/tox_releasenotes.sh b/tools/tox_releasenotes.sh
new file mode 100755
index 0000000..fc64b99
--- /dev/null
+++ b/tools/tox_releasenotes.sh
@@ -0,0 +1,28 @@
+#!/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|A|??" && $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}