From 40870207612543784bb8d512979720a1044a942f Mon Sep 17 00:00:00 2001 From: Eduard Bloch Date: Sun, 6 Oct 2024 14:36:15 +0200 Subject: [PATCH] Build dependency on gennews.sh for NEWS creation Also consider only 3.x tags for news creation, and no merge commits. --- Makefile.am | 2 +- gennews.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index f310f4d55..8147eeffd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,7 +47,7 @@ AUTHORS: )>$@ ; \ else touch $@ ; fi -NEWS: +NEWS: gennews.sh $(AM_V_GEN)if test -x "`which git 2>/dev/null`" -a -d "$(srcdir)/.git" ; then \ ( cd $(srcdir) ; \ echo "$(PACKAGE) -- history of user-visible changes. $(DATE)" ; \ diff --git a/gennews.sh b/gennews.sh index 3d42d65ab..06947d811 100755 --- a/gennews.sh +++ b/gennews.sh @@ -9,7 +9,8 @@ fi t= i=0 -for o in $(git tag --sort=-creatordate) ""; do +# consider only tags starting with a number, i.e. skip local junk tags +for o in $(git tag --sort=-creatordate | grep ^3) ""; do if [ $i -ge 8 ]; then break; fi i=$((i+1)) if [ -z "$t" ] ; then @@ -43,7 +44,7 @@ for o in $(git tag --sort=-creatordate) ""; do /usr/bin/echo -e "$cmd\n\n$notes\n" fi fi - cmd="git shortlog -e -n -w80,6,8 ${o}${o:+...}${t}" + cmd="git shortlog --no-merges -e -n -w80,6,8 ${o}${o:+...}${t}" /usr/bin/echo -e "$cmd\n\n$(eval $cmd)\n" t="$o" done|sed -r 's,[[:space:]][[:space:]]*$,,'