]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/release/makeall
Final po changes for Release-5.0.3
[bacula/bacula] / bacula / release / makeall
index d2a8bd57a88bb6b814d1452fe714490cce4947fe..12035f4e804e6cef16dbc064f1447709060d196c 100755 (executable)
@@ -2,19 +2,22 @@
 #
 # Make full release
 #
+. ./functions
+
 # Bacula git repos
-bacula=${bacula:-${HOME}/bacula/k/bacula}
-docs=${docs:-${HOME}/bacula/k/docs}
-rescue=${rescue:-${HOME}/bacula/k/rescue}
+bacula=${bacula:-${HOME}/bacula/k}
+docs=${docs:-${HOME}/bacula/docs}
+rescue=${rescue:-${HOME}/bacula/rescue}
 #
 # Set the following to your remote name.  By default it is origin.
+#  NOTE!!! There is a different remote set on rescue below
 remote=bs
 
 #
 # Note, you will probably want to set updatepo=no if you
 #   run this script multiple times for a given release.
-export updatepo=no
-export push=yes
+export updatepo=yes
+export push=no
 
 
 if [ $# != 1 ] ; then
@@ -28,43 +31,40 @@ branch=$1
 cwd=`pwd`
 
 # We pull the version $ver from the main bacula source directory
-cd $bacula
+cd $bacula/bacula
+check_return_code "makeall: Directory $bacula/bacula does not exist"
+
 current=`git branch | awk '/*/ { print $2 }'`
-cd bacula
-if [ $?  -ne 0 ]; then
-   echo "Directory: $1 does not exist"
-   exit 1
-fi
 git checkout ${branch}
+check_return_code "makeall: Checkout of branch ${branch} failed."
+
 git pull ${remote} ${branch}
-if [ $? -ne 0 ]; then
-   echo "Checkout of branch ${branch} failed."
-   exit 1
-fi
 ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
 git checkout ${current}
 cd $cwd
 
-
 # ./makeclean
 ./makebacularel $bacula $remote $branch $ver
+check_return_code "$0: makebacularel bad return code"
+
 ./makedocsrel $bacula $docs $remote $branch $ver
-./makerescuerel $rescue $remote $branch $ver
+check_return_code "$0: makedocsrel bad return code"
+
+
 ./makewinrel $bacula $remote $branch $ver | tee win$$.log
+check_return_code "$0: makewinrel bad return code"
 
 # strip ./configure strerror from Win log file
 sed -i -e 's%strerror%%' win$$.log
 # check for warning and error messages
 grep -i warning win$$.log >/dev/null
-if [ $? -eq 0 ] ; then
-  echo " "
-  echo "Warnings in win$$.log"
-  exit 1
-fi
+check_return_code "makeall: Warnings in win$$.log"
 grep -i error win$$.log >/dev/null
-if [ $? -eq 0 ] ; then
-  echo " "
-  echo "Errors in win$$.log"
-  exit 1
-fi
+check_return_code "makeall: Errors in win$$.log"
 rm -f win$$.log
+
+remote=sf
+./makerescuerel $rescue $remote $branch $ver
+check_return_code "$0: makerescuerel bad return code"
+
+exit 0