#!/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 <