source: branches/samba-3.2.x/release-scripts/create-tarball@ 201

Last change on this file since 201 was 133, checked in by Paul Smedley, 17 years ago

Update trunk to 3.2.0pre3

File size: 2.1 KB
Line 
1#!/bin/bash
2
3TOPDIR="`dirname $0`/.."
4
5cd $TOPDIR
6
7echo -n "Please enter branch to cut tarball from: "
8read branch
9
10if [ "x$branch" = "x" ]; then
11 echo "You must enter a name! Exiting...."
12 exit 1
13fi
14
15git-checkout $branch
16if [ $? -ne 0 ]; then
17 echo "Invalid branch name! Exiting...."
18 exit 2
19fi
20
21VER_H=source/include/version.h
22(cd source && ./script/mkversion.sh)
23
24if [ ! -f $VER_H ]; then
25 echo "Failed to find $VER_H! Exiting...."
26 exit 1
27fi
28
29version=`grep SAMBA_VERSION_OFFICIAL_STRING $VER_H | awk '{print $3}'`
30vendor_version=`grep SAMBA_VERSION_VENDOR_SUFFIX $VER_H | awk '{print $3}'`
31if [ -n "$vendor_version" ]; then
32 version="$version-$vendor_version"
33fi
34version=`echo $version | sed 's/\"//g'`
35
36echo "Creating release tarball for Samba $version"
37
38/bin/rm -rf ../samba-${version}
39git-archive --format=tar --prefix=samba-${version}/ HEAD | (cd .. && tar xf -)
40
41pushd ../samba-${version}
42
43echo "Enter the absolute path to the generated Samba docs directory."
44echo -n "Just hit return to exclude the docs from the generate tarball: "
45read docsdir
46
47if [ "x$docsdir" != "x" ]; then
48 if [ ! -d "$docsdir" ]; then
49 echo "$docsdir does not exist! Exiting...."
50 exit 1
51 fi
52
53 /bin/rm -rf docs
54 mkdir docs
55 rsync -a --exclude=.svn $docsdir/ docs/
56
57 cd docs
58 /bin/rm -rf test.pdf Samba4*pdf htmldocs/Samba4* htmldocs/test
59 /bin/mv manpages-3 manpages
60 /bin/mv htmldocs/manpages-3 htmldocs/manpages
61 cd ..
62fi
63
64cd source
65./autogen.sh
66cd ..
67
68cd ..
69tar cf samba-${version}.tar --exclude=.git* --exclude=CVS --exclude=.svn samba-${version}
70gpg --detach-sign --armor samba-${version}.tar
71gzip -9 samba-${version}.tar
72
73popd
74echo -n "Enter tag name (or hit <enter> to skip): "
75read tagname
76
77if [ "x$tagname" != "x" ]; then
78 if [ "x`git-tag -l $tagname`" != "x" ]; then
79 echo -n "Tag exists. Do you wish to overwrite? (y/N): "
80 read answer
81
82 if [ "x$answer" != "xy" ]; then
83 echo "Tag creation aborted."
84 exit 1
85 fi
86 fi
87
88 echo -n "Enter the keyid:"
89 read keyid
90 if [ x"$keyid" = x"" ];then
91 echo "no keyid"
92 exit 1
93 fi
94 git-tag -u $keyid ${tagname}
95fi
96
97echo "Done!"
98exit 0
Note: See TracBrowser for help on using the repository browser.