diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-01-16 23:24:44 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-01-16 23:24:44 +0300 |
commit | fd03ea4a903b79a0a7894315b3b43fb08108f938 (patch) | |
tree | 0dbce899aca9e727977b2a0becbcc78c6c2de6a4 /release-scripts/create-tarball | |
parent | e2ffd5110173c6c7d9c15853646988e536331ed0 (diff) | |
parent | 60c3ec3fca08b7d36df760cd6093adb5a807afa0 (diff) | |
download | samba-fd03ea4a903b79a0a7894315b3b43fb08108f938.tar.gz samba-fd03ea4a903b79a0a7894315b3b43fb08108f938.tar.bz2 samba-fd03ea4a903b79a0a7894315b3b43fb08108f938.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit b01f34141509c90b12003786957790866c286cba)
Diffstat (limited to 'release-scripts/create-tarball')
-rwxr-xr-x | release-scripts/create-tarball | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/release-scripts/create-tarball b/release-scripts/create-tarball new file mode 100755 index 0000000000..459227262d --- /dev/null +++ b/release-scripts/create-tarball @@ -0,0 +1,85 @@ +#!/bin/bash + +TOPDIR="`dirname $0`/.." + +cd $TOPDIR + +echo -n "Please enter branch to cut tarball from: " +read branch + +if [ "x$branch" = "x" ]; then + echo "You must enter a name! Exiting...." + exit 1 +fi + +git-checkout $branch +if [ $? -ne 0 ]; then + echo "Invalid branch name! Exiting...." + exit 2 +fi + +VER_H=source/include/version.h +(cd source && ./autogen.sh) + +if [ ! -f $VER_H ]; then + echo "Failed to find $VER_H! Exiting...." + exit 1 +fi + +version=`grep SAMBA_VERSION_OFFICIAL_STRING $VER_H | awk '{print $3}'` +version="$version-`grep SAMBA_VERSION_VENDOR_SUFFIX $VER_H | awk '{print $3}'`" +version=`echo $version | sed 's/\"//g'` + +echo "Creating release tarball for Samba $version" + +/bin/rm -rf ../samba-${version} +git-archive --format=tar --prefix=samba-${version}/ HEAD | (cd .. && tar xf -) + +pushd ../samba-${version} + +echo "Enter the absolute path to the generated Samba docs directory." +echo -n "Just hit return to exclude the docs from the generate tarball: " +read docsdir + +if [ "x$docsdir" != "x" ]; then + if [ ! -d "$docsdir" ]; then + echo "$docsdir does not exist! Exiting...." + exit 1 + fi + + /bin/rm -rf docs + mkdir docs + rsync -a $docsdir/ docs/ + + cd docs + /bin/rm -rf test.pdf Samba4*pdf htmldocs/Samba4* htmldocs/test + /bin/mv manpages-3 manpages + /bin/mv htmldocs/manpages-3 htmldocs/manpages + cd .. +fi + +cd .. +tar cf samba-${version}.tar --exclude=.git* --exclude=CVS --exclude=.svn samba-${version} +gpg --detach-sign --armor samba-${version}.tar +gzip -9 samba-${version}.tar + +popd +echo -n "Enter tag name (or hit <enter> to skip): " +read tagname + +if [ "x$tagname" != "x" ]; then + if [ "x`git-tag -l $tagname`" != "x" ]; then + echo -n "Tag exists. Do you wish to overwrite? (y/N): " + read answer + + if [ "x$answer" != "xy" ]; then + echo "Tag creation aborted." + exit 1 + fi + fi + + git-tag -s ${tagname} +fi + +echo "Done!" +exit 0 |