automake-patches
[Top][All Lists]
Advanced

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

[PATCH 2/6] release: generate a stub for the release announcement


From: Stefano Lattarini
Subject: [PATCH 2/6] release: generate a stub for the release announcement
Date: Sat, 8 Dec 2012 21:42:38 +0100

It's much better than having to write it my hand each time; after all,
most of it is either boilerplate or a cope of NEWS entries.

* Makefile.am (determine_release_type): Also set the shell variable
'$announcement_type' appropriately.
(print-release-type): Print the value of this new variable as well.
(announcement): New phony target, generate a files with the same name.
The recipe uses the shell variable '$announcement_type'.
(CLEANFILES): Clean it.
(PACKAGE_MAILINGLIST): New make macro, used when generating the
'announcement' file.
* HACKING: Explain how to take advantage of the new convenience
target.
* .gitignore: Ignore the 'announcement' file.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 .gitignore  |  1 +
 HACKING     |  4 ++++
 Makefile.am | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 60 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3bcdc9d..9ead89c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/announcement
 /ChangeLog
 /aclocal.m4
 /configure
diff --git a/HACKING b/HACKING
index d69c75d..fe2bc51 100644
--- a/HACKING
+++ b/HACKING
@@ -275,6 +275,10 @@
 * Don't forget to "git push" your changes so they appear in the public
   git tree.
 
+* Create an announcement message with "make announcement".  Edit the
+  generated 'announcement' file appropriately, in particularly filling
+  in by hand any "TODO" left in there.
+
 * Send the announcement at least to <address@hidden> and
   <address@hidden>.  If the release is a stable one, the announcement
   must also go to <address@hidden>; if it is an alpha or beta release,
diff --git a/Makefile.am b/Makefile.am
index dd170bc..304fca5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -776,20 +776,28 @@ git_must_have_clean_workdir = \
 
 determine_release_type = \
   if $(match_version) '$(stable_major_version_rx)'; then \
-    release_type='Major release' dest=ftp; \
+    release_type='Major release'; \
+    announcement_type='major release'; \
+    dest=ftp; \
   elif $(match_version) '$(stable_minor_version_rx)'; then \
-    release_type='Minor release' dest=ftp; \
+    release_type='Minor release'; \
+    announcement_type='maintenance release'; \
+    dest=ftp; \
   elif $(match_version) '$(beta_version_rx)'; then \
-    release_type='Beta release' dest=alpha; \
+    release_type='Beta release'; \
+    announcement_type='test release'; \
+    dest=alpha; \
   else \
     fatal "invalid version '$(VERSION)' for a release"; \
   fi
 
 # Help the debugging of $(determine_release_type) and related code.
 print-release-type:
-       @fatal () { echo "$@: $$*"; exit 0; } \
+       @set -e -u \
+         && fatal () { echo "$@: $$*"; exit 0; } \
          && $(determine_release_type) \
-         && echo "$$release_type $(VERSION)"
+         && echo "$$release_type $(VERSION);" \
+                 "it will be announced as a $$announcement_type"
 
 git-tag-release: maintainer-check
        @set -e; set -u; \
@@ -895,6 +903,48 @@ compare-autodiffs: autodiffs
        exit $$st
 .PHONY: autodiffs compare-autodiffs
 
+## ---------------------------------------------- ##
+##  Help writing the announcement for a release.  ##
+## ---------------------------------------------- ##
+
+PACKAGE_MAILINGLIST = address@hidden
+
+announcement: NEWS
+       $(AM_V_GEN): \
+         && rm -f $@ address@hidden \
+         && fatal () { echo "$@: $$*" >&2; exit 1; } \
+         && $(determine_release_type) \
+         && ftp_base="ftp://$$dest.gnu.org/gnu/$(PACKAGE)" \
+         && X () { printf '%s\n' "$$*" >> address@hidden; } \
+         && X "We are pleased to announce the $(PACKAGE_NAME) $(VERSION)" \
+              "$$announcement_type." \
+         && X \
+         && X "**TODO** Brief description of the release here." \
+         && X \
+         && X "**TODO** This description can span multiple paragraphs." \
+         && X \
+         && X "See below for the detailed list of changes since the" \
+         && X "previous version, as summarized by the NEWS file." \
+         && X \
+         && X "Download here:" \
+         && X \
+         && X "  $$ftp_base/$(PACKAGE)-$(VERSION).tar.gz" \
+         && X "  $$ftp_base/$(PACKAGE)-$(VERSION).tar.xz" \
+         && X \
+         && X "Please report bugs and problems to" \
+              "<$(PACKAGE_BUGREPORT)>," \
+         && X "and send general comments and feedback to" \
+              "<$(PACKAGE_MAILINGLIST)>." \
+         && X \
+         && X "Thanks to everyone who has reported problems, contributed" \
+         && X "patches, and helped testing Automake!" \
+         && X \
+         && X "-*-*-*-" \
+         && X \
+         && sed -n -e '/^~~~/q' -e p $(srcdir)/NEWS >> address@hidden \
+         && mv -f address@hidden $@
+.PHONY: announcement
+CLEANFILES += announcement
 
 ## --------------------------------------------------------------------- ##
 ##  Synchronize third-party files that are committed in our repository.  ##
-- 
1.8.0.1.347.gf94c325




reply via email to

[Prev in Thread] Current Thread [Next in Thread]