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