summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-12-08 18:45:42 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-12-08 21:43:42 +0100
commit234a9cad19d98c7b301a1cbfd0520ef854f15515 (patch)
tree0a8e5cd7eef2474eacdb0ff6a521baede0cd508a
parent24508503b85e22939ed247990bf1421e86cccd32 (diff)
downloadautomake-234a9cad19d98c7b301a1cbfd0520ef854f15515.tar.gz
release: generate a stub for the release announcement
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 <stefano.lattarini@gmail.com>
-rw-r--r--.gitignore1
-rw-r--r--HACKING4
-rw-r--r--Makefile.am60
3 files changed, 60 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 3bcdc9dec..9ead89c2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/announcement
/ChangeLog
/aclocal.m4
/configure
diff --git a/HACKING b/HACKING
index d69c75dbf..fe2bc5136 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 <autotools-announce@gnu.org> and
<automake@gnu.org>. If the release is a stable one, the announcement
must also go to <info-gnu@gnu.org>; if it is an alpha or beta release,
diff --git a/Makefile.am b/Makefile.am
index dd170bcff..304fca55d 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 = automake@gnu.org
+
+announcement: NEWS
+ $(AM_V_GEN): \
+ && rm -f $@ $@-t \
+ && fatal () { echo "$@: $$*" >&2; exit 1; } \
+ && $(determine_release_type) \
+ && ftp_base="ftp://$$dest.gnu.org/gnu/$(PACKAGE)" \
+ && X () { printf '%s\n' "$$*" >> $@-t; } \
+ && 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 >> $@-t \
+ && mv -f $@-t $@
+.PHONY: announcement
+CLEANFILES += announcement
## --------------------------------------------------------------------- ##
## Synchronize third-party files that are committed in our repository. ##