Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / tools / releasenotes_tox.sh
1 #!/usr/bin/env bash
2
3 rm -rf releasenotes/build
4
5 sphinx-build -a -E -W \
6     -d releasenotes/build/doctrees \
7     -b html \
8     releasenotes/source releasenotes/build/html
9 BUILD_RESULT=$?
10
11 UNCOMMITTED_NOTES=$(git status --porcelain | \
12     awk '$1 == "M" && $2 ~ /releasenotes\/notes/ {print $2}')
13
14 if [ "${UNCOMMITTED_NOTES}" ]
15 then
16     cat <<EOF
17
18 REMINDER: The following changes to release notes have not been committed:
19
20 ${UNCOMMITTED_NOTES}
21
22 While that may be intentional, keep in mind that release notes are built from
23 committed changes, not the working directory.
24
25 EOF
26 fi
27
28 exit ${BUILD_RESULT}