debianrelease-1.10release-1.4release-1.5release-1.6release-1.7release-1.8release-1.9
Last change
on this file since 5c81472 was
5319565,
checked in by Nelson Elhage <nelhage@mit.edu>, 16 years ago
|
Add a script to create a release tag and tarball.
|
-
Property mode set to
100755
|
File size:
891 bytes
|
Rev | Line | |
---|
[5319565] | 1 | #!/bin/sh -e |
---|
| 2 | |
---|
| 3 | die() { |
---|
| 4 | echo "$@" >&2 |
---|
| 5 | exit 1 |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | VERS=$(perl -lne 'print $1 if m{^#define\s+OWL_VERSION_STRING\s+"([^"]+)"\s*$}' owl.h) \ |
---|
| 9 | || die "Unable to parse barnowl version" |
---|
| 10 | TAG=barnowl-$VERS |
---|
| 11 | TGZ="$TAG-src" |
---|
| 12 | |
---|
| 13 | if git cat-file -t "$TAG" > /dev/null 2>&1; then |
---|
| 14 | die "Error: Object $TAG already exists." |
---|
| 15 | fi |
---|
| 16 | |
---|
| 17 | exittrap() { :; } |
---|
| 18 | for sig in 1 2 13 15; do trap "exit $(($sig + 128))" $sig; done |
---|
| 19 | trap 'exittrap' EXIT |
---|
| 20 | |
---|
| 21 | git tag -s -m "BarnOwl $VERS" "$TAG" |
---|
| 22 | |
---|
| 23 | TMPDIR=$(mktemp -d /tmp/barnowl.XXXXXX) |
---|
| 24 | |
---|
| 25 | exittrap() { rm -rf "$TMPDIR"; } |
---|
| 26 | |
---|
| 27 | git archive --format=tar --prefix="$TGZ/" "$TAG" | tar -x -C "$TMPDIR" |
---|
| 28 | |
---|
| 29 | CODIR=$(pwd) |
---|
| 30 | cd "$TMPDIR/$TGZ" |
---|
| 31 | autoreconf |
---|
| 32 | cd "$TMPDIR" |
---|
| 33 | tar czvf "$TGZ.tgz" "$TGZ" |
---|
| 34 | cd "$CODIR" |
---|
| 35 | |
---|
| 36 | mv "$TMPDIR/$TGZ.tgz" . |
---|
| 37 | rm -rf "$TMPDIR" |
---|
| 38 | |
---|
| 39 | exittrap() { :; } |
---|
| 40 | |
---|
| 41 | echo "Created release tarball for BarnOwl $VERS in $(pwd)" |
---|
| 42 | echo "Remember to bump OWL_VERSION_STRING for future development." |
---|
Note: See
TracBrowser
for help on using the repository browser.