s3-libads: Remove obsolete signal type cast.
[Samba/ekacnet.git] / source4 / script / mkrelease.sh
blob303dfe6d953e9e568976e90136024d494972ffe2
1 #!/bin/sh
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
9 OUTDIR=`mktemp -d samba-XXXXX`
10 (git archive --format=tar HEAD | (cd $OUTDIR/ && tar xf -))
12 echo SAMBA_VERSION_IS_GIT_SNAPSHOT=no >> $OUTDIR/source4/VERSION
14 #Prepare the tarball for a Samba4 release, with some generated files,
15 #but without Samba3 stuff (to avoid confusion)
16 ( cd $OUTDIR/ || exit 1
17 rm -rf README Manifest Read-Manifest-Now Roadmap source3 packaging docs-xml examples swat WHATSNEW.txt MAINTAINERS || exit 1
18 cd source4 || exit 1
19 ./autogen.sh || exit 1
20 ./configure || exit 1
21 make dist || exit 1
22 ) || exit 1
24 VERSION_FILE=$OUTDIR/source4/version.h
25 if [ ! -f $VERSION_FILE ]; then
26 echo "Cannot find version.h at $VERSION_FILE"
27 exit 1;
30 VERSION=`sed -n 's/^SAMBA_VERSION_STRING=//p' $VERSION_FILE`
31 echo "Version: $VERSION"
32 mv $OUTDIR samba-$VERSION || exit 1
33 tar -cf samba-$VERSION.tar samba-$VERSION || (rm -rf samba-$VERSION; exit 1)
34 rm -rf samba-$VERSION || exit 1
35 echo "Now run: "
36 echo "gpg --detach-sign --armor samba-$VERSION.tar"
37 echo "gzip samba-$VERSION.tar"
38 echo "And then upload "
39 echo "samba-$VERSION.tar.gz samba-$VERSION.tar.asc"
40 echo "to pub/samba/samba4/ on samba.org"