]> git.sur5r.net Git - bacula/bacula/blob - bacula/release/makeall
Tweak makeall again
[bacula/bacula] / bacula / release / makeall
1 #!/bin/sh
2 #
3 # Make full release
4 #
5 . ./functions
6
7 # Bacula git repos
8 bacula=${bacula:-${HOME}/bacula/k}
9 docs=${docs:-${HOME}/bacula/docs}
10 rescue=${rescue:-${HOME}/bacula/rescue}
11 #
12 # Set the following to your remote name.  By default it is origin.
13 remote=bs
14
15 #
16 # Note, you will probably want to set updatepo=no if you
17 #   run this script multiple times for a given release.
18 export updatepo=no
19 export push=yes
20
21
22 if [ $# != 1 ] ; then
23   echo "Need $0 <Branch-to-release>"
24   echo "e.g. $0 Branch-5.0"
25   exit 1
26 fi
27
28 branch=$1
29
30 cwd=`pwd`
31
32 # We pull the version $ver from the main bacula source directory
33 cd $bacula/bacula
34 check_return_code "makeall: Directory $bacula/bacula does not exist"
35
36 current=`git branch | awk '/*/ { print $2 }'`
37 git checkout ${branch}
38 check_return_code "makeall: Checkout of branch ${branch} failed."
39
40 git pull ${remote} ${branch}
41 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
42 git checkout ${current}
43 cd $cwd
44
45 # ./makeclean
46 ./makebacularel $bacula $remote $branch $ver
47 check_return_code "$0: makebacularel bad return code"
48
49 ./makedocsrel $bacula $docs $remote $branch $ver
50 check_return_code "$0: makedocsrel bad return code"
51
52
53 ./makewinrel $bacula $remote $branch $ver | tee win$$.log
54 check_return_code "$0: makewinrel bad return code"
55
56 # strip ./configure strerror from Win log file
57 sed -i -e 's%strerror%%' win$$.log
58 # check for warning and error messages
59 grep -i warning win$$.log >/dev/null
60 check_return_code "makeall: Warnings in win$$.log"
61 grep -i error win$$.log >/dev/null
62 check_return_code "makeall: Errors in win$$.log"
63 rm -f win$$.log
64
65 ./makerescuerel $rescue $remote $branch $ver
66 check_return_code "$0: makerescuerel bad return code"
67
68 exit 0