Merge "Reminder that release notes are built from commits"

This commit is contained in:
Jenkins 2016-08-03 10:44:03 +00:00 committed by Gerrit Code Review
commit b5822aa446
2 changed files with 28 additions and 3 deletions

27
tools/releasenotes_tox.sh Executable file
View File

@ -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}

View File

@ -103,9 +103,7 @@ commands = bandit -c bandit.yaml -r nova -n 5 -ll
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
commands = bash -c tools/releasenotes_tox.sh
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126