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