4 # This script is used to make a Bacula rescue release
6 # It writes in the current directory, so we recommend that you
7 # do not run it in the Bacula source or Git directory, but
8 # in a special release directory.
10 # Commit all changes, export the release, make a release tar.
15 base_pkg=bacula-rescue
20 echo "Need $0 <rescue-source-directory> <branch>"
21 echo "e.g. $0 rescue-source master"
26 echo "Directory: $1 does not exist"
31 echo "Directory: $1 does not exist"
36 git checkout ${branch}
38 echo "Checkout of branch ${branch} in ${src} failed."
41 git pull origin ${branch}
42 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' version.h`
45 echo "Making $reltype for $base_pkg-$ver ..."
47 echo "OK? ctl-c to stop"
51 echo "Creating new tag -- $fulltag"
55 echo "Non-zero return status from Git"
59 echo "Create Tag $fulltag done"
61 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
64 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
67 echo "Non-zero return status from Git"
71 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
74 ./sign $base_pkg-$ver.tar.gz
75 ls -l $base_pkg-$ver.tar.*
77 if [ a$push != ano ]; then
79 git push origin $branch
80 git push origin tag $fulltag