summaryrefslogtreecommitdiff
path: root/tools/telepathy.am
diff options
context:
space:
mode:
Diffstat (limited to 'tools/telepathy.am')
-rw-r--r--tools/telepathy.am65
1 files changed, 59 insertions, 6 deletions
diff --git a/tools/telepathy.am b/tools/telepathy.am
index 7f7794f..5e78dfd 100644
--- a/tools/telepathy.am
+++ b/tools/telepathy.am
@@ -1,17 +1,64 @@
## Useful top-level Makefile.am snippets for Telepathy projects.
-maintainer-sign-release:
- gpg --detach-sign -a @PACKAGE@-@VERSION@.tar.bz2
+dist-hook:
+ chmod u+w ${distdir}/ChangeLog
+ if test -d ${top_srcdir}/.git; then \
+ ( cd ${top_srcdir} && git log --date=iso $(CHANGELOG_RANGE) ) > ${distdir}/ChangeLog; \
+ fi
-maintainer-upload-release: _maintainer-upload-release
+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
-_maintainer-upload-release-check:
+_is-release-check:
@case @VERSION@ in \
- (*.*.*.*) \
- echo "@VERSION@ is not a release" >&2; \
+ (*.*.*.*|*+) \
+ echo "Hey! @VERSION@ is not a release!" >&2; \
exit 2; \
;; \
esac
+ @cd ${top_srcdir} && \
+ if ! git diff --no-ext-diff --quiet --exit-code; then \
+ echo "Hey! Your tree is dirty! No release for you." >&2; \
+ exit 2; \
+ fi
+ @cd ${top_srcdir} && \
+ 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.bz2.asc: %.tar.bz2
+ $(AM_V_GEN)gpg --detach-sign --armor $@
+
+@PACKAGE@-@VERSION@.tar.bz2: _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.bz2
+
+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.bz2
test -f @PACKAGE@-@VERSION@.tar.bz2.asc
gpg --verify @PACKAGE@-@VERSION@.tar.bz2.asc
@@ -20,4 +67,10 @@ _maintainer-upload-release: _maintainer-upload-release-check
rsync -vzP @PACKAGE@-@VERSION@.tar.bz2 telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/releases/@PACKAGE@/@PACKAGE@-@VERSION@.tar.bz2
rsync -vzP @PACKAGE@-@VERSION@.tar.bz2.asc telepathy.freedesktop.org:/srv/telepathy.freedesktop.org/www/releases/@PACKAGE@/@PACKAGE@-@VERSION@.tar.bz2.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: