tripleo-quickstart/ci-scripts/releasenotes_tox.sh
Gael Chamoulaud 77e537f868 Add blank newline at the end of file
This patch adds blank newline for each [yaml|sh] files if they
don't end with one. This will allows us getting linters happy and avoid us
having git adding "\ No newline at end of file" in diffs when pushing
a new patch.

In other way, you can configure Git to properly handle line endings in
typing:

$ git config --global core.autocrlf input

Change-Id: I8a113541b3eae6a36ed32995822dedbbd2d9666e
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-03-27 10:40:32 +02:00

29 lines
601 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" && $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}