branch=$1
+cwd=`pwd`
+
+# We pull the version $ver from the main bacula source directory
+cd $bacula
+current=`git branch | awk '/*/ { print $2 }'`
+cd bacula
+if [ $? -ne 0 ]; then
+ echo "Directory: $1 does not exist"
+ exit 1
+fi
+git checkout ${branch}
+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
-./makedocsrel $bacula $docs $remote $branch
-./makerescuerel $rescue $remote $branch
-./makewinrel $bacula $remote $branch | tee win$$.log
+./makebacularel $bacula $remote $branch $ver
+./makedocsrel $bacula $docs $remote $branch $ver
+./makerescuerel $rescue $remote $branch $ver
+./makewinrel $bacula $remote $branch $ver | tee win$$.log
# strip ./configure strerror from Win log file
sed -i -e 's%strerror%%' win$$.log
tagbase=Release-
base_dir=bacula
base_pkg=bacula
-if [ $# != 3 ] ; then
- echo "Need $0 <source-directory> <remote-name> <branch>"
- echo "e.g. $0 release-source bee 4.0.0"
+ver=$4
+if [ $# != 4 ] ; then
+ echo "Need $0 <source-directory> <remote-name> <branch> <version>"
+ echo "e.g. $0 release-source bee 4.0 4.0.1"
exit 1
fi
cd $1
echo "Checkout of branch ${branch} failed."
exit 1
fi
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
fulltag=$tagbase$ver
echo " "
echo "Making $reltype for $base_pkg-$ver ..."
if [ a$push != ano ]; then
cd ${src}
git push ${remote} ${branch}
- git push ${remote} tag ${fulltag}
- echo "Pushed ${remote} and push tag ${fulltag}"
+# git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote}"
fi
cd ${src}
base_pkg=bacula-$base_dir
remote=$3
branch=$4
-if [ $# != 4 ] ; then
- echo "Need $0 <bacula-source-directory> <docs-source-directory> <remote-name> <branch>"
- echo "e.g. $0 bacula-source docs-source bee master"
+ver=$5
+
+if [ $# != 5 ] ; then
+ echo "Need $0 <bacula-source-directory> <docs-source-directory> <remote-name> <branch> <version>"
+ echo "e.g. $0 bacula-source docs-source bee master 4.0.1"
exit 1
fi
cd $1
exit 1
fi
git pull ${remote} ${branch}
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h`
fulltag=$tagbase$ver
echo " "
echo "Making $reltype for $base_pkg-$ver ..."
if [ a$push != ano ]; then
cd ${src}
git push ${remote} ${branch}
- git push ${remote} tag ${fulltag}
- echo "Pushed ${remote} and push tag ${fulltag}"
+# git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote}"
fi
cd ${src}
base_dir=rescue
remote=$2
branch=$3
+ver=$4
-if [ $# != 3 ] ; then
- echo "Need $0 <rescue-source-directory> <remote-name> <branch>"
- echo "e.g. $0 rescue-source bee Branch-4.0"
+if [ $# != 4 ] ; then
+ echo "Need $0 <rescue-source-directory> <remote-name> <branch> <version>"
+ echo "e.g. $0 rescue-source bee Branch-4.0 4.0.1"
exit 1
fi
cd $1
exit 1
fi
git pull ${remote} ${branch}
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' version.h`
fulltag=$tagbase$ver
echo " "
echo "Making $reltype for $base_pkg-$ver ..."
if [ a$push != ano ]; then
cd ${src}
git push ${remote} ${branch}
- git push ${remote} tag ${fulltag}
- echo "Pushed ${remote} and push tag ${fulltag}"
+# git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote}"
fi
cd ${src}
git checkout ${current}
base_pkg=bacula
remote=$2
branch=$3
+ver=$4
-if [ $# != 3 ] ; then
- echo "Need $0 <bacula-source-directory> <remote-name> <branch>"
- echo "e.g. $0 rescue-source bee Branch-4.0"
+if [ $# != 4 ] ; then
+ echo "Need $0 <bacula-source-directory> <remote-name> <branch> <version>"
+ echo "e.g. $0 rescue-source bee Branch-4.0 4.0.1"
exit 1
fi
cd $1
exit 1
fi
git pull ${remote} ${branch}
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
fulltag=$tagbase$ver
echo " "
echo "Making $reltype for Windows $base_pkg-$ver ..."