bacula
docs
- rescu
+ rescue
+
+ Also ensure that you have set repo to the name of your repository.
+ Normally, it is origin, but some developers (Kern) use bee.
3. Ensure that the environment variable "version" is set correctly
- (yes, this could be automatically pulled from $bacula).
+ in each repo. Specifically, in:
+
+ bacula/src/version.h
+ rescue/version.h
+ winbmr/rescue/version.h
+ gui/bweb/ReleaseNotes (for makebwebrel)
+
+4. Run the makeall script.
+
+ ./makeall Branch-4.0 # specify branch to release
-4. Run the makeall script. There should be no errors. If
+5. There should be no errors. If
there are, fix them, and re-run the script or re-run the scripts
that makeall calls:
makerescuerel ...
makewinrel ...
-5. All the output files should be put in this directory.
+6. All the output files should be put in this directory.
-6. Before releasing, detar the main Bacula source into some
+7. Before releasing, detar the main Bacula source into some
directory and run all the regression tests using the files
in the bacula-xx.xx.xx.tar.gz file. This ensures that there
are no missing files.
-7. Also before releasing, run at least one backup using the
+8. Also before releasing, run at least one backup using the
Win32 and/or Win64 file daemon.
#
# Make full release
#
-branch=5.0.0
-#
# Bacula git repos
-bacula=/home/kern/bacula/k
-docs=/home/kern/bacula/docs
-rescue=/home/kern/bacula/rescue
+bacula=${bacula:-${HOME}/bacula/k/bacula}
+docs=${docs:-${HOME}/bacula/k/docs}
+rescue=${rescue:-${HOME}/bacula/k/rescue}
+#
+# Set the following to your remote name. By default it is origin.
+remote=bs
+
export push=yes
-export updatepo=yes
+#
+# Note, you will probably want to set updatepo=no if you
+# run this script multiple times for a given release.
+export updatepo=no
+
+if [ $# != 1 ] ; then
+ echo "Need $0 <Branch-to-release>"
+ echo "e.g. $0 Branch-5.0"
+ exit 1
+fi
+
+branch=$1
-./makeclean
-./makebacularel $bacula $branch
-./makedocsrel $bacula $docs $branch
-./makerescuerel $rescue $branch
-./makewinrel $bacula $branch | tee win$$.log
+# ./makeclean
+./makebacularel $bacula $remote $branch
+./makedocsrel $bacula $docs $remote $branch
+./makerescuerel $rescue $remote $branch
+./makewinrel $bacula $remote $branch | tee win$$.log
+# 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 " "
cwd=`pwd`
reltype=release
tagbase=Release-
+base_dir=bacula
base_pkg=bacula
-if [ $# != 2 ] ; then
- echo "Need $0 <source-directory> <branch>"
- echo "e.g. $0 release-source 3.0.3"
+if [ $# != 3 ] ; then
+ echo "Need $0 <source-directory> <remote-name> <branch>"
+ echo "e.g. $0 release-source bee 4.0.0"
exit 1
fi
cd $1
exit 1
fi
src=`pwd`
-cd $base_pkg
+current=`git branch | awk '/*/ { print $2 }'`
+cd $base_dir
if [ $? -ne 0 ]; then
echo "Directory: $1 does not exist"
exit 1
fi
-branch=$2
+remote=$2
+branch=$3
git checkout ${branch}
-git pull origin ${branch}
+git pull ${remote} ${branch}
if [ $? -ne 0 ]; then
echo "Checkout of branch ${branch} failed."
exit 1
exit 1
fi
echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
-git checkout master
cd ${cwd}
tar xfz $base_pkg-$ver.tar.gz
cd $base_pkg-$ver/
tar cvfz ../$base_pkg-$ver.tar.gz $base_pkg-$ver
tar cvfz ../$base_pkg-gui-$ver.tar.gz $base_pkg-gui-$ver
tar cvfz ../$base_pkg-regress-$ver.tar.gz $base_pkg-regress-$ver
+rm -rf $base_pkg-$ver
cd ..
./sign $base_pkg-$ver.tar.gz
./sign $base_pkg-gui-$ver.tar.gz
if [ a$push != ano ]; then
cd ${src}
- git push origin $branch
- git push origin tag $fulltag
+ git push ${remote} ${branch}
+ git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote} and push tag ${fulltag}"
fi
+
+cd ${src}
+git checkout ${current}
#!/bin/sh
-rm -rf bacula-* win32bacula* win64bacula*
+rm -rf bacula-* win32bacula* win64bacula* win*.log
tagbase=Release-
base_dir=docs
base_pkg=bacula-$base_dir
-branch=$3
-if [ $# != 3 ] ; then
- echo "Need $0 <bacula-source-directory> <docs-source-directory> <branch>"
- echo "e.g. $0 bacula-source docs-source master"
+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"
exit 1
fi
cd $1
echo "Directory: $1 does not exist"
exit 1
fi
+bcurrent=`git branch | awk '/*/ { print $2 }'`
git checkout ${branch}
if [ $? -ne 0 ]; then
echo "Checkout of branch ${branch} in $1/bacula failed."
exit 1
fi
-git pull origin ${branch}
+git pull ${remote} ${branch}
bsrc=`pwd`
cd ${cwd}
cd $2
echo "Directory: $2 does not exist"
exit 1
fi
+current=`git branch | awk '/*/ { print $2 }'`
src=`pwd`
git checkout ${branch}
if [ $? -ne 0 ]; then
echo "Checkout of branch ${branch} in ${src} failed."
exit 1
fi
-git pull origin ${branch}
+git pull ${remote} ${branch}
ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h`
fulltag=$tagbase$ver
echo " "
exit 1
fi
echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
-git checkout master
cd ${cwd}
tar xfz $base_pkg-$ver.tar.gz
cd $base_pkg-$ver/
cd $base_pkg-$ver
./configure --with-bacula=$bsrc
make en
-cd ${bsrc}
-git checkout master
cd ${cwd}
echo "Tarring docs ..."
tar cf $base_pkg-$ver.tar $base_pkg-$ver
if [ a$push != ano ]; then
cd ${src}
- git push origin $branch
- git push origin tag $fulltag
+ git push ${remote} ${branch}
+ git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote} and push tag ${fulltag}"
fi
+
+cd ${src}
+git checkout ${current}
+
+cd ${bsrc}
+git checkout ${bcurrent}
tagbase=Release-
base_pkg=bacula-rescue
base_dir=rescue
-branch=$2
+remote=$2
+branch=$3
-if [ $# != 2 ] ; then
- echo "Need $0 <rescue-source-directory> <branch>"
- echo "e.g. $0 rescue-source master"
+if [ $# != 3 ] ; then
+ echo "Need $0 <rescue-source-directory> <remote-name> <branch>"
+ echo "e.g. $0 rescue-source bee Branch-4.0"
exit 1
fi
cd $1
exit 1
fi
+current=`git branch | awk '/*/ { print $2 }'`
src=`pwd`
git checkout ${branch}
if [ $? -ne 0 ]; then
echo "Checkout of branch ${branch} in ${src} failed."
exit 1
fi
-git pull origin ${branch}
+git pull ${remote} ${branch}
ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' version.h`
fulltag=$tagbase$ver
echo " "
exit 1
fi
echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz"
-git checkout master
-cd ${cwd}
-./sign $base_pkg-$ver.tar.gz
-ls -l $base_pkg-$ver.tar.*
-
if [ a$push != ano ]; then
cd ${src}
- git push origin $branch
- git push origin tag $fulltag
+ git push ${remote} ${branch}
+ git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote} and push tag ${fulltag}"
fi
+cd ${src}
+git checkout ${current}
+
+cd ${cwd}
+./sign $base_pkg-$ver.tar.gz
+ls -l $base_pkg-$ver.tar.*
cwd=`pwd`
reltype=release
tagbase=Release-
-base_pkg=windows
-branch=$2
+base_pkg=bacula
+remote=$2
+branch=$3
-if [ $# != 2 ] ; then
- echo "Need $0 <bacula-source-directory> <branch>"
- echo "e.g. $0 rescue-source master"
+if [ $# != 3 ] ; then
+ echo "Need $0 <bacula-source-directory> <remote-name> <branch>"
+ echo "e.g. $0 rescue-source bee Branch-4.0"
exit 1
fi
cd $1
echo "Directory: $1 does not exist"
exit 1
fi
+current=`git branch | awk '/*/ { print $2 }'`
src=`pwd`
git checkout ${branch}
if [ $? -ne 0 ]; then
echo "Checkout of branch ${branch} in ${src} failed."
exit 1
fi
-git pull origin ${branch}
+git pull ${remote} ${branch}
ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
fulltag=$tagbase$ver
echo " "
-echo "Making $reltype for $base_pkg-$ver ..."
+echo "Making $reltype for Windows $base_pkg-$ver ..."
echo " "
echo "OK? ctl-c to stop"
read a
cd src/win32
-rm -f release32/win32bacula-$ver.exe
-rm -f release64/win64bacula-$ver.exe
+rm -f release32/${base_pkg}-win32-$ver.exe
+rm -f release64/${base_pkg}-win64-$ver.exe
make clean
+cd ../..
+./configure
+cd src/win32
./makeall
-cp release32/win32bacula-$ver.exe ${cwd}
-cp release64/win64bacula-$ver.exe ${cwd}
-git checkout master
+cp release32/${base_pkg}-win32-$ver.exe ${cwd}
+cp release64/${base_pkg}-win64-$ver.exe ${cwd}
cd ${cwd}
rm -f *.exe.sig
-./sign win32bacula-$ver.exe
-./sign win64bacula-$ver.exe
-ls -l win*.exe*
+./sign ${base_pkg}-win32-$ver.exe
+./sign ${base_pkg}-win64-$ver.exe
+ls -l ${base_pkg}-win*.exe*
+cd ${src}
+# get back to original branch
+git checkout ${current}