Make sure server_role gets initialized in backend provisioning code -
[kai/samba-autobuild/.git] / source4 / script / mkrelease.sh
1 #!/bin/sh
2
3 if [ ! -d ".git" -o `dirname $0` != "./source4/script" ]; then
4         echo "Run this script from the top-level directory in the"
5         echo "repository as: ./source4/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 #Prepare the tarball for a Samba4 release, with some generated files,
13 #but without Samba3 stuff (to avoid confusion)
14 ( cd $TMPDIR/ || exit 1
15  rm -rf README Manifest Read-Manifest-Now Roadmap source3 packaging docs-xml examples swat WHATSNEW.txt MAINTAINERS || exit 1
16  cd source4 || exit 1
17  ./autogen.sh || exit 1
18  ./configure || exit 1
19  make dist  || exit 1
20 ) || exit 1
21
22 VERSION_FILE=$TMPDIR/source4/version.h
23 if [ ! -f $VERSION_FILE ]; then
24     echo "Cannot find version.h at $VERSION_FILE"
25     exit 1;
26 fi
27
28 VERSION=`sed -n 's/^SAMBA_VERSION_STRING=//p' $VERSION_FILE`
29 mv $TMPDIR samba-$VERSION || exit 1
30 tar -cf samba-$VERSION.tar samba-$VERSION || (rm -rf samba-$VERSION; exit 1)
31 rm -rf samba-$VERSION || exit 1
32 echo "Now run: "
33 echo "gpg --detach-sign --armor samba-$VERSION.tar"
34 echo "gzip samba-$VERSION.tar" 
35 echo "And then upload "
36 echo "samba-$VERSION.tar.gz samba-$VERSION.tar.asc" 
37 echo "to pub/samba/samba4/ on samba.org"
38
39
40