From 5ee95b324085bbbb7fbce3b4deb236a3e916a622 Mon Sep 17 00:00:00 2001 From: Artom Lifshitz Date: Wed, 6 Jul 2016 14:39:57 -0400 Subject: [PATCH] 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 --- tools/releasenotes_tox.sh | 27 +++++++++++++++++++++++++++ tox.ini | 4 +--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100755 tools/releasenotes_tox.sh diff --git a/tools/releasenotes_tox.sh b/tools/releasenotes_tox.sh new file mode 100755 index 000000000000..060aa5812fe0 --- /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 <