|
|
@ -13,7 +13,12 @@ matched=0
|
|
|
|
|
|
|
|
|
|
|
|
# assume that anything in the changelogs directory which starts with a number
|
|
|
|
# assume that anything in the changelogs directory which starts with a number
|
|
|
|
# is intended as a newsfile.
|
|
|
|
# is intended as a newsfile.
|
|
|
|
find changelogs -regex '.*/[0-9]+\.[^/]+$' | while read f; do
|
|
|
|
#
|
|
|
|
|
|
|
|
# (we use the < <(...) syntax rather than a regular pipe to avoid spawning a
|
|
|
|
|
|
|
|
# subshell for the while loop, which would mean that changes to shell variables
|
|
|
|
|
|
|
|
# are not propagated)
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
while read f; do
|
|
|
|
basename=$(basename $f)
|
|
|
|
basename=$(basename $f)
|
|
|
|
dirname=$(dirname $f)
|
|
|
|
dirname=$(dirname $f)
|
|
|
|
|
|
|
|
|
|
|
@ -26,7 +31,7 @@ find changelogs -regex '.*/[0-9]+\.[^/]+$' | while read f; do
|
|
|
|
# see if this newsfile corresponds to the right PR
|
|
|
|
# see if this newsfile corresponds to the right PR
|
|
|
|
[[ -n "$pr" && "$basename" == "$pr".* ]] && matched=1
|
|
|
|
[[ -n "$pr" && "$basename" == "$pr".* ]] && matched=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done < <(find changelogs -regex '.*/[0-9]+\.[^/]+$')
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$pr" && "$matched" -eq 0 ]]; then
|
|
|
|
if [[ -n "$pr" && "$matched" -eq 0 ]]; then
|
|
|
|
echo -e "\e[31mERROR: Did not find a news fragment with the right number: expected changelogs/*/newsfragments/$pr.*\e[39m" >&2
|
|
|
|
echo -e "\e[31mERROR: Did not find a news fragment with the right number: expected changelogs/*/newsfragments/$pr.*\e[39m" >&2
|
|
|
|