3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # This script is used to make a Bacula rescue 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, export the release, make a release tar.
17 base_pkg=bacula-rescue
22 echo "Need $0 <rescue-source-directory> <branch>"
23 echo "e.g. $0 rescue-source master"
28 echo "Directory: $1 does not exist"
33 echo "Directory: $1 does not exist"
38 git checkout ${branch}
40 echo "Checkout of branch ${branch} in ${src} failed."
43 git pull origin ${branch}
44 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' version.h`
47 echo "Making $reltype for $base_pkg-$ver ..."
49 echo "OK? ctl-c to stop"
53 echo "Creating new tag -- $fulltag"
57 echo "Non-zero return status from Git"
61 echo "Create Tag $fulltag done"
63 rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
66 git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
69 echo "Non-zero return status from Git"
73 echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
76 ./sign $base_pkg-$ver.tar.gz
77 ls -l $base_pkg-$ver.tar.*
79 if [ a$push != ano ]; then
81 git push origin $branch
82 git push origin tag $fulltag