Skip to content

Commit 024849e

Browse files
committed
add a 'release' script
The release script tags the current HEAD and produces a tarball including a configure script.
1 parent 3ccea6c commit 024849e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

release

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/sh
2+
3+
name=0verkill
4+
version="$1"
5+
6+
if [ -z "$version" ]; then
7+
echo "Tags a version in git, adds a configure script to a clean"
8+
echo "git checkout and makes a tarball for release."
9+
echo
10+
echo "Usage:"
11+
echo "$0 <version string>"
12+
exit 1
13+
fi
14+
15+
echo "Tagging as v$version."
16+
# XXX: signed tag would be better
17+
git tag -a -m "Released version $version." "v$version"
18+
WORKDIR=`mktemp -d `
19+
echo "Checking out to $WORKDIR"
20+
git archive --format=tar --prefix=$name-$version/ "v$version" | tar -x -C "$WORKDIR"
21+
echo "Running autotools"
22+
SRCDIR=`pwd`
23+
cd "$WORKDIR/$name-$version"
24+
autoreconf
25+
rm -rf autom4te.cache
26+
cd "$SRCDIR"
27+
echo "Packing as $name-$version.tar.bz2"
28+
tar -cjf "$name-$version.tar.bz2" -C "$WORKDIR" "$name-$version/"
29+
echo "Cleaning $WORKDIR"
30+
rm -rf "WORKDIR"

0 commit comments

Comments
 (0)