fix: Fix release notes checker

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-02-03 20:10:07 +01:00
parent 8003e17a76
commit 19b3af8f2f
No known key found for this signature in database
GPG Key ID: BC5E2BD907F9A8EC

View File

@ -29,11 +29,10 @@ if [ $# -ge 1 ] && [ -n "$1" ]; then
DEFAULT_BRANCH=$(git remote show origin | awk '/HEAD branch/ {print $NF}')
fi
printf "Checking changelog annotation for chart %s\n" "$root"
CURRENT=$(cat Chart.yaml | yq e '.annotations."artifacthub.io/changes"' -P -)
if [ "$CURRENT" == "" ] || [ "$CURRENT" == "null" ]; then
printf >&2 "%s\n" "Changelog annotation has not been set for this chart!"
printf >&2 "Changelog annotation has not been set in %s!\n" "$chart_file"
exit 1
fi
@ -41,13 +40,7 @@ if [ $# -ge 1 ] && [ -n "$1" ]; then
ORIGINAL=$(git show origin/$DEFAULT_BRANCH:./Chart.yaml | yq e '.annotations."artifacthub.io/changes"' -P -)
if [ "$CURRENT" == "$ORIGINAL" ]; then
printf >&2 "%s\n" "Changelog annotation has not been updated!"
# exit 1
fi
printf "Checking README.md for chart %s\n" "$root"
if diff README.md <(git show origin/$DEFAULT_BRANCH:./README.md) >/dev/null; then
printf >&2 "%s\n" "README.md has not been updated!"
printf >&2 "Changelog annotation has not been updated in %s!\n" "$chart_file"
exit 1
fi
else