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