3 # Script for generating a release
9 echo "Usage: $0 release-id" 1>&2
14 releasetag
=$PACKAGE-$release
15 releasedir
=$PACKAGE-$release
17 GIT_DIR
=`cd "${GIT_DIR-.git}" && pwd`
20 if [ `git diff --cached | wc -l` -ne 0 ]; then
21 echo "$0: index not clean" 1>&2
25 if [ x
"$release" = x
'test' ]; then
28 releasedir
=$PACKAGE-$release
30 echo $release > version
31 if [ `git diff version | wc -l` -ne 0 ]; then
33 git commit
-m "Update version for release $release" version
37 rm -f "$GIT_DIR"/refs
/tags
/$releasetag
38 git tag
-a -m "$releasetag" -f "$releasetag"
43 tmpdir
=/var
/tmp
/release.$$
48 git archive
--format=tar $releasetag |
tar -xf - -C $releasedir
53 tar cvvf
$releasedir.
tar $releasedir
54 gzip -9 $releasedir.
tar
55 mv -f $releasedir.
tar.gz
$here/..