tripleo-upgrade/ci-scripts/releasenotes_tox.sh
Alex Schultz 87bca89c73 Setup tox
Setup tox with pep8, linters and reno jobs so that CI passes for the
tripleo-upgrades repo.

Change-Id: I2cd200eb77501717211c0db3f52c96c2c7b22663
2017-12-06 14:02:27 -07:00

24 lines
600 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|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}