From 66c6e16563f7894ffa922c86a8d45146fa64e3b7 Mon Sep 17 00:00:00 2001 From: Alan Malta Rodrigues Date: Fri, 7 Jul 2023 15:42:28 -0400 Subject: [PATCH] Fix buildrelease for when there are no changes between releases --- bin/buildrelease.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/buildrelease.sh b/bin/buildrelease.sh index 47c66639c0..5e64db9fb1 100755 --- a/bin/buildrelease.sh +++ b/bin/buildrelease.sh @@ -72,6 +72,10 @@ echo "" >> $TMP_HASHES_SUBJ_AUTHOR # Use github public API to fetch pull request # from commit hash cat $TMP_HASHES_SUBJ_AUTHOR | while read commitline; do + if [ -z "$commitline" ] + then + continue # line is empty + fi HASH_ID=$(echo $commitline | awk '{print $1}') PR=$(curl -s https://api.github.com/repos/dmwm/WMCore/commits/$HASH_ID/pulls | grep -Po '\"html_url\": \"https://github.com/dmwm/WMCore/pull/\K[0-9]+' | sort | uniq) # remove hash_id from the commit line