]> git.sur5r.net Git - bacula/bacula/blob - bacula/release/makewinrel
Add 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 ver=$2
18 if [ $# != 2 ] ; then
19   echo "Need $0 <rescue-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 fulltag=$tagbase$ver
41 echo " "
42 echo "Making $reltype for $base_pkg-$ver ..."
43 echo " "
44 echo "OK?  ctl-c to stop"
45 read a
46
47 cd src/win32
48 rm -f release32/winbacula-$ver.exe
49 rm -f release64/win64bacula-$ver.exe
50 make clean
51 ./makeall
52 cp release32/winbacula-$ver.exe ${cwd}
53 cp release64/win64bacula-$ver.exe ${cwd}
54 git checkout master
55 cd ${cwd}
56 rm -f *.exe.sig
57 ./sign winbacula-$ver.exe
58 ./sign win64bacula-$ver.exe
59 ls -l win*.exe*
60
61 echo " "
62 echo "If everything is OK, don't forget to push $src tags to the repo"
63 echo " "