make_release.sh 380 Bytes
Newer Older
Iñigo Martínez's avatar
Iñigo Martínez committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/sh
set -x

test -n "$srcdir" || srcdir=$1
test -n "$srcdir" || srcdir=.

cd "$srcdir"

PROJECT=graphene
VERSION=$(git describe --abbrev=0)
NAME="${PROJECT}-${VERSION}"

rm -f "${NAME}.tar"

echo "Creating git tree archive…"
git archive --prefix="${NAME}/" --format=tar HEAD > ${NAME}.tar

rm -f "${NAME}.tar.xz"

echo "Compressing archive…"
xz -f "${NAME}.tar"

set +x