[bug-buddy] Generate ChangeLog file from git log



commit 073a876af343100b820aa566426a294ad6957ca4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Apr 30 14:59:36 2009 +0200

    Generate ChangeLog file from git log
    
    Autogenerate the ChangeLog file from git log output.
---
 ChangeLog => ChangeLog.pre-git |    0
 Makefile.am                    |   22 +++++++++++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog.pre-git
similarity index 100%
rename from ChangeLog
rename to ChangeLog.pre-git
diff --git a/Makefile.am b/Makefile.am
index 370cd92..88245c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,9 +11,10 @@ SUBDIRS = po $(GOOGLE_BREAKPAD_DIR) gnome-breakpad src docs data
 DIST_SUBDIRS = $(SUBDIRS) $(GOOGLE_BREAKPAD_DIST_DIR) 
 
 EXTRA_DIST = \
-	MAINTAINERS					\
-	gnome-doc-utils.make				\
-	omf.make					\
+	ChangeLog.pre-git	\
+	MAINTAINERS		\
+	gnome-doc-utils.make	\
+	omf.make		\
 	xmldocs.make
 
 DISTCLEANFILES =					\
@@ -24,3 +25,18 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
 distuninstallcheck_listfiles =  \
 find -regex '.*/var/scrollkeeper/.*' -prune -or -type f -print
 
+ChangeLog:
+	@echo Creating $@
+	@if test -d "$(srcdir)/.git"; then \
+	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log BUG_BUDDY_2_26_0.. --stat -M -C --name-status  --date=short --no-color) | fmt --split-only > $  tmp \
+	  && mv -f $  tmp $@ \
+	  || ($(RM) $  tmp; \
+	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
+	else \
+	  test -f $@ || \
+	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+	   echo A git checkout and git-log is required to generate this file >> $@); \
+	fi
+
+.PHONY: ChangeLog



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]