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.
22 echo "Need $0 <source-directory> <remote-name> <branch> <version>"
23 echo "e.g. $0 release-source bee 4.0 4.0.1"
28 echo "Directory: $1 does not exist"
32 current=`git branch | awk '/*/ { print $2 }'`
35 echo "Directory: $1 does not exist"
40 git checkout ${branch}
41 git pull ${remote} ${branch}
43 echo "Checkout of branch ${branch} failed."
48 echo "Making $reltype for $base_pkg-$ver ..."
50 echo "OK? ctl-c to stop"
53 if [ $reltype != "beta" ] ; then
56 sed 's%^#define DEVELOPER 1%/* #define DEVELOPER 1 */%g' 1 >version.h
60 if [ a$updatepo != ano ]; then
61 ./configure --enable-client-only
65 git commit -am "Final po changes for ${fulltag}"
68 echo "Creating new tag -- $fulltag"
72 echo "Non-zero return status from Git"
76 echo "Create Tag $fulltag done"
78 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
81 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
84 echo "Non-zero return status from Git"
88 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
90 tar xfz $base_pkg-$ver.tar.gz
92 mv bacula $base_pkg-$ver
93 mv gui $base_pkg-gui-$ver
94 mv regress $base_pkg-regress-$ver
95 tar cvfz ../$base_pkg-$ver.tar.gz $base_pkg-$ver
96 tar cvfz ../$base_pkg-gui-$ver.tar.gz $base_pkg-gui-$ver
97 tar cvfz ../$base_pkg-regress-$ver.tar.gz $base_pkg-regress-$ver
100 ./sign $base_pkg-$ver.tar.gz
101 ./sign $base_pkg-gui-$ver.tar.gz
102 ./sign $base_pkg-regress-$ver.tar.gz
104 if [ a$push != ano ]; then
106 git push ${remote} ${branch}
107 # git push ${remote} tag ${fulltag}
108 echo "Pushed ${remote}"
112 git checkout ${current}