diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-08 18:45:42 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-12-08 21:43:42 +0100 |
commit | 234a9cad19d98c7b301a1cbfd0520ef854f15515 (patch) | |
tree | 0a8e5cd7eef2474eacdb0ff6a521baede0cd508a /Makefile.am | |
parent | 24508503b85e22939ed247990bf1421e86cccd32 (diff) | |
download | automake-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>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 60 |
1 files changed, 55 insertions, 5 deletions
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. ## |