Merge Samba3 and Samba4 together
[tprouty/samba.git] / source4 / script / mkrelease.sh
1 #!/bin/sh
2
3 if [ ! -d ".git" -o `dirname $0` != "./source/script" ]; then
4         echo "Run this script from the top-level directory in the"
5         echo "repository as: ./source/script/mkrelease.sh"
6         exit 1
7 fi
8
9 TMPDIR=`mktemp -d samba-XXXXX`
10 (git archive --format=tar HEAD | (cd $TMPDIR/ && tar xf -))
11
12 ( cd $TMPDIR/source || exit 1
13  ./autogen.sh || exit 1
14  ./configure || exit 1
15  make dist  || exit 1
16 ) || exit 1
17
18 VERSION=`sed -n 's/^SAMBA_VERSION_STRING=//p' $TMPDIR/source/version.h`
19 mv $TMPDIR samba-$VERSION || exit 1
20 tar -cf samba-$VERSION.tar samba-$VERSION || (rm -rf samba-$VERSION; exit 1)
21 rm -rf samba-$VERSION || exit 1
22 echo "Now run: "
23 echo "gpg --detach-sign --armor samba-$VERSION.tar"
24 echo "gzip samba-$VERSION.tar" 
25 echo "And then upload "
26 echo "samba-$VERSION.tar.gz samba-$VERSION.tar.asc" 
27 echo "to pub/samba/samba4/ on samba.org"
28
29
30