]> git.sur5r.net Git - bacula/bacula/blob - bacula/release/makewinrel
Tweak .gitignore
[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 . ./functions
13
14 cwd=`pwd`
15 reltype=release
16 tagbase=Release-
17 base_pkg=bacula
18 remote=$2
19 branch=$3
20 ver=$4
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.1"
25   exit 1
26 fi
27 cd $1/bacula
28 check_return_code "$0: Directory $1/bacula does not exist"
29 src=$1/bacula
30
31 current=`git branch | awk '/*/ { print $2 }'`
32 src=`pwd` 
33 git checkout ${branch}
34 check_return_code "$0: Checkout of branch ${branch} in ${src} failed."
35
36 git pull ${remote} ${branch}
37 fulltag=$tagbase$ver
38 echo " "
39 echo "$0: Making $reltype for Windows $base_pkg-$ver ..."
40 echo " "
41 echo "OK?  ctl-c to stop"
42 read a
43
44 cd src/win32
45 rm -f release32/${base_pkg}-win32-$ver.exe
46 rm -f release64/${base_pkg}-win64-$ver.exe
47 make clean
48 cd ../..
49 ./configure
50 cd src/win32
51 ./makeall
52 cp release32/${base_pkg}-win32-$ver.exe ${cwd}
53 cp release64/${base_pkg}-win64-$ver.exe ${cwd}
54 cd ${cwd}
55 rm -f *.exe.sig
56 ./sign ${base_pkg}-win32-$ver.exe
57 ./sign ${base_pkg}-win64-$ver.exe
58 ls -l ${base_pkg}-win*.exe*
59
60 cd ${src}
61 # get back to original branch
62 git checkout ${current}
63 exit 0