From 36a5aab7936d41dee2d98fe2541bcd8d31869317 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Wed, 2 Aug 2023 13:13:23 +0200 Subject: [PATCH] check-changelogs: report all modified packages --- scripts/ci/check-changelogs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/ci/check-changelogs.sh b/scripts/ci/check-changelogs.sh index ab44bc2db71..736853362e3 100755 --- a/scripts/ci/check-changelogs.sh +++ b/scripts/ci/check-changelogs.sh @@ -4,13 +4,15 @@ FD="$(which fdfind 2>/dev/null || which fd 2>/dev/null)" set -eo pipefail +RESULT=0 + function check_project () { project=$1 n=$() if [[ -n $(git diff --name-only origin/master..HEAD -- $project) ]];then if [[ -z $(git diff --name-only origin/master..HEAD -- $project/CHANGELOG.md) ]]; then echo "$project was modified but its CHANGELOG was not updated" - exit 1 + RESULT=1 fi fi } @@ -18,3 +20,5 @@ function check_project () { for cbl in $($FD -e 'cabal'); do check_project $(dirname $cbl) done + +exit $RESULT