]> git.sur5r.net Git - bacula/bacula/blob - bacula/release/makewinrel
ef1f1a63a646fe604d3760f10c81e5f0df7343e6
[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=bacula
16 remote=$2
17 branch=$3
18 ver=$4
19
20 if [ $# != 4 ] ; then
21   echo "Need $0 <bacula-source-directory> <remote-name> <branch> <version>"
22   echo "e.g. $0 rescue-source bee Branch-4.0 4.0.1"
23   exit 1
24 fi
25 cd $1
26 if [ $? -ne 0 ]; then
27    echo "Directory: $1 does not exist"
28    exit 1
29 fi
30 cd bacula
31 if [ $?  -ne 0 ]; then
32    echo "Directory: $1 does not exist"
33    exit 1
34 fi
35 current=`git branch | awk '/*/ { print $2 }'`
36 src=`pwd` 
37 git checkout ${branch}
38 if [ $? -ne 0 ]; then
39    echo "Checkout of branch ${branch} in ${src} failed."
40    exit 1
41 fi
42 git pull ${remote} ${branch}
43 fulltag=$tagbase$ver
44 echo " "
45 echo "Making $reltype for Windows $base_pkg-$ver ..."
46 echo " "
47 echo "OK?  ctl-c to stop"
48 read a
49
50 cd src/win32
51 rm -f release32/${base_pkg}-win32-$ver.exe
52 rm -f release64/${base_pkg}-win64-$ver.exe
53 make clean
54 cd ../..
55 ./configure
56 cd src/win32
57 ./makeall
58 cp release32/${base_pkg}-win32-$ver.exe ${cwd}
59 cp release64/${base_pkg}-win64-$ver.exe ${cwd}
60 cd ${cwd}
61 rm -f *.exe.sig
62 ./sign ${base_pkg}-win32-$ver.exe
63 ./sign ${base_pkg}-win64-$ver.exe
64 ls -l ${base_pkg}-win*.exe*
65
66 cd ${src}
67 # get back to original branch
68 git checkout ${current}