From 31093dd920959dec1c158bae5cdb371ec4a6622b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 15 Aug 2012 14:07:31 +0200 Subject: [PATCH] dist: provide a complete changelog The previous changelog is moved to a NEWS file --- Makefile.am | 18 +++++++++++++++++- CHANGELOG => NEWS | 0 2 files changed, 17 insertions(+), 1 deletion(-) rename CHANGELOG => NEWS (100%) diff --git a/Makefile.am b/Makefile.am index 1e9f76a8..09703913 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,20 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src man tests DIST_SUBDIRS = $(SUBDIRS) libevent -dist_doc_DATA = README.md CHANGELOG +dist_doc_DATA = README.md NEWS + +# Build changelog from git history +dist-hook: $(distdir)/ChangeLog +$(distdir)/ChangeLog: + if test -d $(top_srcdir)/.git; then \ + prev=$$(git describe --tags --always --match [0-9]* 2> /dev/null) ; \ + for tag in $$(git tag | grep -E '^[0-9]+(\.[0-9]+){1,}$$' | sort -rn); do \ + if [ x"$$prev" = x ]; then prev=$$tag ; fi ; \ + if [ x"$$prev" = x"$$tag" ]; then continue; fi ; \ + echo "$$prev:" ; \ + echo "" ; \ + git log --pretty=' - %s' $$tag..$$prev ; \ + echo "" ; \ + prev=$$tag ; \ + done > $@ ; \ + fi diff --git a/CHANGELOG b/NEWS similarity index 100% rename from CHANGELOG rename to NEWS -- 2.39.5