source: scripts/do-release @ 94ef58c

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 94ef58c was bff8f9f, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
do-release: Make sure ChangeLog is updated for the new version.
  • Property mode set to 100755
File size: 1.2 KB
Line 
1#!/bin/sh -e
2
3die() {
4    echo "$@" >&2
5    exit 1
6}
7
8VERS=$(perl -ne 'print $1 if m{^AC_INIT\(\[[^\]]+\],\s*\[([^\]]+)\]}' configure.ac) \
9    || die "Unable to parse barnowl version"
10TAG=barnowl-$VERS
11TGZ="$TAG-src"
12
13if [ "$VERS" != "$(head -1 ChangeLog)" ]; then
14    die "No ChangeLog entry for version $VERS, aborting."
15fi
16
17if git cat-file -t "$TAG" > /dev/null 2>&1; then
18    die "Error: Object $TAG already exists."
19fi
20
21exittrap() { :; }
22for sig in 1 2 13 15; do trap "exit $(($sig + 128))" $sig; done
23trap 'exittrap' EXIT
24
25git tag -s -m "BarnOwl $VERS" "$TAG"
26
27TMPDIR=$(mktemp -d /tmp/barnowl.XXXXXX)
28
29exittrap() { rm -rf "$TMPDIR"; }
30
31git archive --format=tar --prefix="$TGZ/" "$TAG" | tar -x -C "$TMPDIR"
32
33CODIR=$(pwd)
34cd "$TMPDIR/$TGZ"
35autoreconf -fvi
36cd "$TMPDIR"
37tar czvf "$TGZ.tgz" "$TGZ"
38cd "$CODIR"
39
40mv "$TMPDIR/$TGZ.tgz" .
41rm -rf "$TMPDIR"
42
43exittrap() { :; }
44
45echo "Created release tarball for BarnOwl $VERS in $(pwd)"
46echo "Remember to bump OWL_VERSION_STRING for future development."
47
48COMMIT=$(git rev-parse "$TAG")
49NOW=$(date +"%B %d, %Y")
50cat <<EOF
51 * '''$NOW''': BarnOwl $VERS Released. [wiki:Download] it here. or see the [/browser/ChangeLog?rev=$COMMIT ChangeLog]
52EOF
Note: See TracBrowser for help on using the repository browser.