[pygobject] release-news: Generate HTML changelog



commit adbe30dc72b4d88bb31055f6ee33fddf32638af9
Author: Martin Pitt <martinpitt gnome org>
Date:   Mon Sep 17 22:32:55 2012 +0200

    release-news: Generate HTML changelog
    
    In addition to producing a NEWS paragraph from the changelog, generate a
    changelog HTML which can be put into blog announcements.
    
    Update HACKING to point this out, too.

 HACKING     |    2 +-
 Makefile.am |   22 ++++++++++++++++------
 2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/HACKING b/HACKING
index d098128..4616e52 100644
--- a/HACKING
+++ b/HACKING
@@ -8,7 +8,7 @@ Making a release
 5. Upload tarball: scp pygobject-3.X.Y.tar.gz tomeuv master gnome org:
 6. Install tarball: ssh tomeuv master gnome org 'ftpadmin install pygobject-3.X.Y.tar.gz'
 7. Send release announcements to gnome-announce-list gnome org; pygtk daa com au; python-hackers-list gnome org; python-announce-list python org
-8. blog about it
+8. blog about it (include the HTMLized NEWS that "make release-news" prints)
 9. Commit post-release version bump
 
 Based on http://live.gnome.org/MaintainersCorner/Releasing
diff --git a/Makefile.am b/Makefile.am
index 20dbf35..f21793f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -89,12 +89,22 @@ doc-dist:
 
 release-news:
 	printf "%-8s%s\n" "$(VERSION)" "`LC_TIME=C date '+%d-%b-%Y'`" > NEWS.tmp
-	last=`head -n1 NEWS | cut -f1 -d' '`; \
-	git log --format='format:        - %s (%aN)%n%b' $$last.. | \
-	  sed -n '/^        -/ p; /bugzilla.gnome.org/ { s/^.*id=\([0-9]\+\).*$$/          (#\1)/; p}' >> NEWS.tmp
-	echo >> NEWS.tmp
-	cat NEWS >> NEWS.tmp
-	mv NEWS.tmp NEWS
+
+	@echo -e "\n\n\nFor blogging, you can copy&paste this HTML formatted news:";
+	@echo "-------------- 8< -------------"
+	@last=`head -n1 NEWS | cut -f1 -d' '`; \
+        echo "<ul>"; \
+	for commit in `git rev-list $$last..`; do \
+	   data=`git log --format="format:%s%n%an%n%b" $$commit^..$$commit`; \
+	   echo "$$data" | perl -e '$$subj = <>; chomp $$subj; $$author = <>; chomp $$author; while (<>) { if (/bugzilla.gnome.org.*id=([0-9]+)/) { $$bug = $$1 }};  print "  <li>$$subj ($$author)"; if ($$bug) { print " (<a href=\"https://bugzilla.gnome.org/show_bug.cgi?id=$$bug\";>#$$bug</a>)"; }; print "</li>\n"'; \
+	   echo "$$data" | perl -e '$$subj = <>; chomp $$subj; $$author = <>; chomp $$author; while (<>) { if (/bugzilla.gnome.org.*id=([0-9]+)/) { $$bug = $$1 }};  print "        - $$subj ($$author)"; if ($$bug) { print " (#$$bug)"; }; print "\n"' >> NEWS.tmp; \
+        done
+	@echo "</ul>"
+	@echo "-------------- 8< -------------"
+
+	@echo >> NEWS.tmp
+	@cat NEWS >> NEWS.tmp
+	@mv NEWS.tmp NEWS
 
 .PHONY: ChangeLog release-news
 



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