forked from hackndev/0verkill
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease
More file actions
executable file
·30 lines (27 loc) · 765 Bytes
/
release
File metadata and controls
executable file
·30 lines (27 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
name=0verkill
version="$1"
if [ -z "$version" ]; then
echo "Tags a version in git, adds a configure script to a clean"
echo "git checkout and makes a tarball for release."
echo
echo "Usage:"
echo "$0 <version string>"
exit 1
fi
echo "Tagging as v$version."
# XXX: signed tag would be better
git tag -a -m "Released version $version." "v$version"
WORKDIR=`mktemp -d `
echo "Checking out to $WORKDIR"
git archive --format=tar --prefix=$name-$version/ "v$version" | tar -x -C "$WORKDIR"
echo "Running autotools"
SRCDIR=`pwd`
cd "$WORKDIR/$name-$version"
autoreconf
rm -rf autom4te.cache
cd "$SRCDIR"
echo "Packing as $name-$version.tar.bz2"
tar -cjf "$name-$version.tar.bz2" -C "$WORKDIR" "$name-$version/"
echo "Cleaning $WORKDIR"
rm -rf "WORKDIR"