Fix extension check in check-newsfragments

This was added a few months ago, but has never worked correctly: it failed to
set the exit code if an incorrectly-named newsfragment was found.
This commit is contained in:
Richard van der Hoff 2026-06-16 17:15:33 +01:00
parent d5db331061
commit 86a11d9d75

View file

@ -26,6 +26,7 @@ while read f; do
# check that each changelog file has a known extension # check that each changelog file has a known extension
if ! [[ "$extension" == "new" || "$extension" == "feature" || "$extension" == "clarification" || "$extension" == "breaking" || "$extension" == "deprecation" ]]; then if ! [[ "$extension" == "new" || "$extension" == "feature" || "$extension" == "clarification" || "$extension" == "breaking" || "$extension" == "deprecation" ]]; then
echo -e "\e[31mERROR: newsfragment $f does not have one of the required file extensions for a changelog entry: .new, .feature, .clarification, .breaking, .deprecation\e[39m" >&2 echo -e "\e[31mERROR: newsfragment $f does not have one of the required file extensions for a changelog entry: .new, .feature, .clarification, .breaking, .deprecation\e[39m" >&2
failed=1
fi fi
# check that there is nothing that looks like a newsfile outside one of the # check that there is nothing that looks like a newsfile outside one of the