source: scripts/do-release @ 776c4bb

release-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change on this file since 776c4bb was db98968, checked in by Nelson Elhage <nelhage@mit.edu>, 15 years ago
Update build scripts for automake.
  • Property mode set to 100755
File size: 1.1 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 git cat-file -t "$TAG" > /dev/null 2>&1; then
14    die "Error: Object $TAG already exists."
15fi
16
17exittrap() { :; }
18for sig in 1 2 13 15; do trap "exit $(($sig + 128))" $sig; done
19trap 'exittrap' EXIT
20
21git tag -s -m "BarnOwl $VERS" "$TAG"
22
23TMPDIR=$(mktemp -d /tmp/barnowl.XXXXXX)
24
25exittrap() { rm -rf "$TMPDIR"; }
26
27git archive --format=tar --prefix="$TGZ/" "$TAG" | tar -x -C "$TMPDIR"
28
29CODIR=$(pwd)
30cd "$TMPDIR/$TGZ"
31autoreconf -fvi
32cd "$TMPDIR"
33tar czvf "$TGZ.tgz" "$TGZ"
34cd "$CODIR"
35
36mv "$TMPDIR/$TGZ.tgz" .
37rm -rf "$TMPDIR"
38
39exittrap() { :; }
40
41echo "Created release tarball for BarnOwl $VERS in $(pwd)"
42echo "Remember to bump OWL_VERSION_STRING for future development."
43
44COMMIT=$(git rev-parse "$TAG")
45NOW=$(date +"%B %d, %Y")
46cat <<EOF
47 * '''$NOW''': BarnOwl $VERS Released. [wiki:Download] it here. or see the [/browser/ChangeLog?rev=$COMMIT ChangeLog]
48EOF
Note: See TracBrowser for help on using the repository browser.