From 19b3af8f2fe7b8fb4690ceb2b795842fb0e348e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=E1=B4=87=CA=80=C9=B4=E1=B4=85=20S=E1=B4=84=CA=9C?= =?UTF-8?q?=E1=B4=8F=CA=80=C9=A2=E1=B4=87=CA=80s?= Date: Thu, 3 Feb 2022 20:10:07 +0100 Subject: [PATCH] fix: Fix release notes checker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs --- .github/scripts/check-releasenotes.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/scripts/check-releasenotes.sh b/.github/scripts/check-releasenotes.sh index 867cffb0..089a1699 100755 --- a/.github/scripts/check-releasenotes.sh +++ b/.github/scripts/check-releasenotes.sh @@ -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