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