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.
24 echo "Need $0 <source-directory> <remote-name> <branch> <version>"
25 echo "e.g. $0 release-source bee 4.0 4.0.1"
29 check_return_code "$0: Directory $1 does not exist"
31 check_return_code "$0: Directory $1/bacula does not exist"
33 current=`git branch | awk '/*/ { print $2 }'`
36 git checkout ${branch}
37 check_return_code "$0: Checkout of branch ${branch} failed."
38 git pull ${remote} ${branch}
41 echo "$0: Making $reltype for $base_pkg-$ver ..."
43 echo "OK? ctl-c to stop"
46 if [ $reltype != "beta" ] ; then
49 sed 's%^#define DEVELOPER 1%/* #define DEVELOPER 1 */%g' 1 >version.h
53 if [ a$updatepo != ano ]; then
54 ./configure --enable-client-only
58 git commit -am "Final po changes for ${fulltag}"
60 git tag -d ${fulltag} 2>/dev/null 1>/dev/null
61 echo "Creating new tag -- $fulltag"
65 echo "makebacularel: Non-zero return status from Git"
69 echo "Create Tag $fulltag done"
71 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
74 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
77 echo "makebacularel: Non-zero return status from Git"
81 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
83 tar xfz $base_pkg-$ver.tar.gz
85 mv bacula $base_pkg-$ver
86 mv gui $base_pkg-gui-$ver
87 mv regress $base_pkg-regress-$ver
88 tar cvfz ../$base_pkg-$ver.tar.gz $base_pkg-$ver
89 tar cvfz ../$base_pkg-gui-$ver.tar.gz $base_pkg-gui-$ver
90 tar cvfz ../$base_pkg-regress-$ver.tar.gz $base_pkg-regress-$ver
93 ./sign $base_pkg-$ver.tar.gz
94 ./sign $base_pkg-gui-$ver.tar.gz
95 ./sign $base_pkg-regress-$ver.tar.gz
97 if [ a$push != ano ]; then
99 git push ${remote} ${branch}
100 # git push ${remote} tag ${fulltag}
101 echo "Pushed ${remote}"
105 git checkout ${current}