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 ./configure --enable-client-only
61 git commit -am "Final po changes for ${fulltag}"
63 echo "Creating new tag -- $fulltag"
64 git tag $fulltag -m "Create tag $fulltag"
67 echo "Non-zero return status from Git"
71 echo "Create Tag $fulltag done"
73 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
76 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
79 echo "Non-zero return status from Git"
83 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
86 tar xfz $base_pkg-$ver.tar.gz
88 mv bacula $base_pkg-$ver
89 mv gui $base_pkg-gui-$ver
90 mv regress $base_pkg-regress-$ver
91 tar cvfz ../$base_pkg-$ver.tar.gz $base_pkg-$ver
92 tar cvfz ../$base_pkg-gui-$ver.tar.gz $base_pkg-gui-$ver
93 tar cvfz ../$base_pkg-regress-$ver.tar.gz $base_pkg-regress-$ver
95 ./sign $base_pkg-$ver.tar.gz
96 ./sign $base_pkg-gui-$ver.tar.gz
97 ./sign $base_pkg-regress-$ver.tar.gz
100 echo "If everything is OK, don't forget to push $src tags to the repo"