diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-07-07 14:33:50 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-07-07 15:39:12 +0100 |
commit | 10287449e56eb7acb54572948b4ce9aaa0a0cd52 (patch) | |
tree | ccb4f292001c7cb0a6f325c26fabbfa799f17630 /tools/telepathy.am | |
parent | 2cb08f95c385adaf10b5a4a9cfe127cfbfdf1ddc (diff) | |
download | telepathy-salut-10287449e56eb7acb54572948b4ce9aaa0a0cd52.tar.gz |
Add and use telepathy.am and make-release-mail.py
This will let me use maintainer-make-release, and adds checks for things
like UNRELEASED.
Diffstat (limited to 'tools/telepathy.am')
-rw-r--r-- | tools/telepathy.am | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/tools/telepathy.am b/tools/telepathy.am new file mode 100644 index 00000000..d080afe7 --- /dev/null +++ b/tools/telepathy.am @@ -0,0 +1,74 @@ +## Useful top-level Makefile.am snippets for Telepathy projects. + +dist-hook: + chmod u+w ${distdir}/ChangeLog + if test -d ${top_srcdir}/.git; then \ + git log --date=iso $(CHANGELOG_RANGE) > ${distdir}/ChangeLog; \ + fi + +distcheck-hook: + @test "z$(CHECK_FOR_UNRELEASED)" = z || \ + case @VERSION@ in \ + *.*.*.*|*+) ;; \ + *) \ + if grep -r UNRELEASED $(CHECK_FOR_UNRELEASED); \ + then \ + echo "^^^ This is meant to be a release, but some files say UNRELEASED" >&2; \ + exit 2; \ + fi \ + ;; \ + esac + +_is-release-check: + @case @VERSION@ in \ + (*.*.*.*|*+) \ + echo "Hey! @VERSION@ is not a release!" >&2; \ + exit 2; \ + ;; \ + esac + @if ! git diff --no-ext-diff --quiet --exit-code; then \ + echo "Hey! Your tree is dirty! No release for you." >&2; \ + exit 2; \ + fi + @if ! git diff --cached --no-ext-diff --quiet --exit-code; then \ + echo "Hey! You have changes staged! No release for you." >&2; \ + exit 2; \ + fi +if ENABLE_GTK_DOC +else + @echo "Hey! You need to pass --enable-gtk-doc to configure!" + @exit 2; +endif + +%.tar.gz.asc: %.tar.gz + $(AM_V_GEN)gpg --detach-sign --armor $@ + +@PACKAGE@-@VERSION@.tar.gz: _is-release-check check distcheck + +maintainer-prepare-release: _is-release-check all distcheck release-mail + git tag -s @PACKAGE@-@VERSION@ -m @PACKAGE@' '@VERSION@ + gpg --detach-sign --armor @PACKAGE@-@VERSION@.tar.gz + +release-mail: NEWS + $(AM_V_GEN)(python $(top_srcdir)/tools/make-release-mail.py \ + @PACKAGE@ @VERSION@ $(top_srcdir)/NEWS > $@.tmp && \ + mv $@.tmp $@) + +maintainer-upload-release: _maintainer-upload-release + +_maintainer-upload-release-check: _is-release-check + test -f @PACKAGE@-@VERSION@.tar.gz + test -f @PACKAGE@-@VERSION@.tar.gz.asc + gpg --verify @PACKAGE@-@VERSION@.tar.gz.asc + +_maintainer-upload-release: _maintainer-upload-release-check + rsync -vzP @PACKAGE@-@VERSION@.tar.gz telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/releases/@PACKAGE@/@PACKAGE@-@VERSION@.tar.gz + rsync -vzP @PACKAGE@-@VERSION@.tar.gz.asc telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/releases/@PACKAGE@/@PACKAGE@-@VERSION@.tar.gz.asc + +maintainer-make-release: maintainer-prepare-release maintainer-upload-release + @echo "Now:" + @echo " • bump the nano-version;" + @echo " • push the branch and tags upstream; and" + @echo " • send release-mail to <telepathy@lists.freedesktop.org>." + +## vim:set ft=automake: |