From ba6c958c7b26fbd79fa96c10fa64e3f053ad3225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergi=20=C3=80lvarez=20i=20Capilla?= Date: Wed, 2 Mar 2022 11:45:52 +0100 Subject: [PATCH] Fix sys/release-notes when HEAD a tagged ##build --- sys/release-notes.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/release-notes.sh b/sys/release-notes.sh index 134c4cc015..3d5d85d777 100755 --- a/sys/release-notes.sh +++ b/sys/release-notes.sh @@ -32,7 +32,13 @@ fi [ -n "$2" ] && VERS="$2" git log ${PREV}..${VERS} > .l -cat .l | grep ^Author | cut -d : -f 2- | sed -e 's,radare,pancake,' | sort -u > .A +# When HEAD contains a tag do this magic +if [ ! -s .l ]; then + VERS=$PREV + PREV=`git tag --sort=committerdate | grep -v conti | tail -n 2 | head -n1` + git log ${PREV}..${VERS} > .l +fi +grep ^Author .l | cut -d : -f 2- | sed -e 's,radare,pancake,' | sort -u > .A echo "Release Notes" echo "-------------" @@ -40,7 +46,7 @@ echo echo "Version: ${VERS}" echo "Previous: ${PREV}" printf "Commits: " -cat .l |grep ^commit |wc -l |xargs echo +grep ^commit .l | wc -l | xargs echo echo "Contributors: `wc -l .A | awk '{print $1}'`" echo echo "Highlights"