4 # This script is used to make a Bacula release
8 # It writes in the current directory, so we recommend that you
9 # do not run it in the Bacula source or Git directory, but
10 # in a special release directory.
12 # Commit all changes, update the language files,
13 # export the release, make a release tar.
20 echo "Need $0 <source-directory> <branch>"
21 echo "e.g. $0 release-source 3.0.3"
26 echo "Directory: $1 does not exist"
32 echo "Directory: $1 does not exist"
36 git checkout ${branch}
37 git pull origin ${branch}
39 echo "Checkout of branch ${branch} failed."
42 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
45 echo "Making $reltype for $base_pkg-$ver ..."
47 echo "OK? ctl-c to stop"
50 if [ $reltype != "beta" ] ; then
53 sed 's%^#define DEVELOPER 1%/* #define DEVELOPER 1 */%g' 1 >version.h
57 if [ a$updatepo != ano ]; then
58 ./configure --enable-client-only
62 git commit -am "Final po changes for ${fulltag}"
65 echo "Creating new tag -- $fulltag"
69 echo "Non-zero return status from Git"
73 echo "Create Tag $fulltag done"
75 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
78 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
81 echo "Non-zero return status from Git"
85 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
88 tar xfz $base_pkg-$ver.tar.gz
90 mv bacula $base_pkg-$ver
91 mv gui $base_pkg-gui-$ver
92 mv regress $base_pkg-regress-$ver
93 tar cvfz ../$base_pkg-$ver.tar.gz $base_pkg-$ver
94 tar cvfz ../$base_pkg-gui-$ver.tar.gz $base_pkg-gui-$ver
95 tar cvfz ../$base_pkg-regress-$ver.tar.gz $base_pkg-regress-$ver
97 ./sign $base_pkg-$ver.tar.gz
98 ./sign $base_pkg-gui-$ver.tar.gz
99 ./sign $base_pkg-regress-$ver.tar.gz
101 if [ a$push != ano ]; then
103 git push origin $branch
104 git push origin tag $fulltag