grim/gplate

Lots of goodies.
gplate-0.0.2
2008-09-20, grim
6ddf3b3ce8ae
Lots of goodies.
Added a release target to the toplevel Makefile
Added checks to make sure the release is good
Automatically gpg sign all DIST_ARCHIVES
--- a/Makefile.am Sat Sep 20 20:24:44 2008 -0500
+++ b/Makefile.am Sat Sep 20 20:25:40 2008 -0500
@@ -20,7 +20,8 @@
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
- po/ChangeLog
+ po/ChangeLog \
+ version-check.sh
pcdata_DATA=gplate.pc
pcdatadir = $(libdir)/pkgconfig
@@ -29,3 +30,12 @@
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
+version-check:
+ @$(top_srcdir)/version-check.sh $(PACKAGE_VERSION)
+
+%.asc: %
+ gpg -a -b $<
+ gpg --verify $@ $<
+
+release: check distcheck version-check $(DIST_ARCHIVES:%=%.asc)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/version-check.sh Sat Sep 20 20:25:40 2008 -0500
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+PACKAGE_VERSION=${1}
+
+fail () {
+ echo ${1}
+ exit 1
+}
+
+# make sure this isn't a mtn release
+if [ x`echo ${PACKAGE_VERSION} | grep mtn` != x ]; then
+ fail "Failing to release from monotone"
+fi
+
+# make sure ChangeLog is updated, has the correct version, and matches today's
+# date
+if [ x$(head ChangeLog | grep -q "^Version ${PACKAGE_VERSION} `date +%m/%d/%Y`:$$") != x ]; then
+ fail "ChangeLog has not been updated for ${PACKAGE_VERSION}"
+fi
+
+# make sure NEWS doesn't have any lines that start with a space
+if [ x`grep "^ " NEWS` != x ]; then
+ fail "NEWS has lines that start with spaces, this is incorrect"
+fi
+
+# make sure there are not any changes in the working copy
+if [ `mtn diff | grep -v "^#" | wc -l` -ne 0 ]; then
+ fail "There are chages in the working copy, please commit them."
+fi
+
+# make sure we're working from a tag
+if [ x`mtn automate select t:gplate-${PACKAGE_VERSION}` != x`mtn automate get_base_revision_id` ]; then
+ fail "Refusing to release without a tag"
+fi
+
+# yay we passed everything
+echo "version-check passed"
+exit 0