]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
dist: provide a complete changelog
authorVincent Bernat <bernat@luffy.cx>
Wed, 15 Aug 2012 12:07:31 +0000 (14:07 +0200)
committerVincent Bernat <bernat@luffy.cx>
Wed, 15 Aug 2012 12:07:31 +0000 (14:07 +0200)
The previous changelog is moved to a NEWS file

Makefile.am
NEWS [moved from CHANGELOG with 100% similarity]

index 1e9f76a8b1550fa9add2bd711cddbb448cee2b46..097039135c948749b6f3bb7375b8cc345583cd99 100644 (file)
@@ -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