]> git.sur5r.net Git - bacula/bacula/blob - bacula/release/makewinrel
Tweak release scripts
[bacula/bacula] / bacula / release / makewinrel
1 #!/bin/sh
2 #
3 #
4 # This script is used to make a Bacula win32 and win64 releases
5
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.
9 #
10 # Commit all changes, export the release, make a release tar.
11 #
12 cwd=`pwd`
13 reltype=release
14 tagbase=Release-
15 base_pkg=windows
16 branch=$2
17
18 if [ $# != 2 ] ; then
19   echo "Need $0 <bacula-source-directory> <branch>"
20   echo "e.g. $0 rescue-source master"
21   exit 1
22 fi
23 cd $1
24 if [ $? -ne 0 ]; then
25    echo "Directory: $1 does not exist"
26    exit 1
27 fi
28 cd bacula
29 if [ $?  -ne 0 ]; then
30    echo "Directory: $1 does not exist"
31    exit 1
32 fi
33 src=`pwd` 
34 git checkout ${branch}
35 if [ $? -ne 0 ]; then
36    echo "Checkout of branch ${branch} in ${src} failed."
37    exit 1
38 fi
39 git pull origin ${branch}
40 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
41 fulltag=$tagbase$ver
42 echo " "
43 echo "Making $reltype for $base_pkg-$ver ..."
44 echo " "
45 echo "OK?  ctl-c to stop"
46 read a
47
48 cd src/win32
49 rm -f release32/win32bacula-$ver.exe
50 rm -f release64/win64bacula-$ver.exe
51 make clean
52 ./makeall
53 cp release32/win32bacula-$ver.exe ${cwd}
54 cp release64/win64bacula-$ver.exe ${cwd}
55 git checkout master
56 cd ${cwd}
57 rm -f *.exe.sig
58 ./sign win32bacula-$ver.exe
59 ./sign win64bacula-$ver.exe
60 ls -l win*.exe*
61