grim/gplate

Lots of goodies.
gplate-0.0.2
2008-09-20, grim
6ddf3b3ce8ae
file isExecutable
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
#!/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