1. Copy the entire contents of this directory out of the
Bacula source tree (this may not be required, but is cleaner).
-2. Edit the makeall file, and update the following enviroment variables
+2. Edit the config file, and update the following enviroment variables
to point to the correct directories on your system. They should
point to directories that contain git repos:
bacula
docs
- rescu
+ rescue
-3. Ensure that the environment variable "version" is set correctly
- (yes, this could be automatically pulled from $bacula).
+ Also ensure that you have set repo to the name of your repository.
+ Normally, it is origin, but some developers (Kern) use bee.
-4. Run the makeall script. There should be no errors. If
+3. Ensure that "branch" is properly set to the right version in
+ the config file.
+
+4. Note, the release version is obtained from bacula/src/version.h and
+ put into a number of files in the release by the release scripts.
+
+5. Run the makeall script.
+
+ ./makeall
+
+6. There should be no errors. If
there are, fix them, and re-run the script or re-run the scripts
that makeall calls:
- makeclean
- makebacularel ...
- makedocsrel ...
- makerescuerel ...
- makewinrel ...
+7. All the output files should be put in this directory.
-5. All the output files should be put in this directory.
-
-6. Before releasing, detar the main Bacula source into some
+8. 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
+9. Also before releasing, run at least one backup using the
Win32 and/or Win64 file daemon.
+
+10 When you are sure, run:
+
+ pushtags
+
+ which will push each repo and push the tags.
--- /dev/null
+#
+# Configuration for release scripts
+
+#
+# Set to the Branch you are working on
+#
+branch=Branch-5.1
+#
+# set reltype to release or beta -- for upload and setting DEVELOPER
+reltype=beta
+
+
+repo=$reltype
+
+# Bacula git repos
+bacula=${bacula:-${HOME}/bee/bacula}
+docs=${docs:-${HOME}/bee/docs}
+
+#
+# Set the following to your remote name. By default it is origin.
+remote=${remote:-origin}
+
+export push=no
+#
+# Note, you will probably want to set updatepo=no if you
+# run this script multiple times for a given release.
+export updatepo=no
+
+cwd=`pwd`
+
+cd ${bacula}/bacula
+if [ $? -ne 0 ]; then
+ echo "Directory: $1 does not exist"
+ exit 1
+fi
+current=`git branch | awk '/*/ { print $2 }'`
+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`
+lsmdate=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' src/version.h`
+
+git checkout ${current}
+
+cd $cwd
#
# Make full release
#
-# Bacula git repos
-bacula=${bacula:-/home/kern/bacula/k}
-docs=${docs:-/home/kern/bacula/docs}
-rescue=${rescue:-/home/kern/bacula/rescue}
-export push=yes
-export updatepo=yes
-current=$(cd $bacula ; git branch | awk '/*/ { print $2 }')
-branch=${1:-$current}
+# Source config
+. ./config
-./makeclean
-./makebacularel $bacula $branch
-./makedocsrel $bacula $docs $branch
-./makerescuerel $rescue $branch
-./makewinrel $bacula $branch | tee win$$.log
+echo "Creating release version: ${ver}"
+cd $cwd
+
+./makebacularel $bacula $remote $branch $ver
+./makedocsrel $bacula $docs $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
+# check for warning and error messages
grep -i warning win$$.log >/dev/null
if [ $? -eq 0 ] ; then
echo " "
# Commit all changes, update the language files,
# export the release, make a release tar.
#
-cwd=`pwd`
-reltype=release
+# source config
+. ./config
+
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"
+
+remote=$2
+branch=$3
+ver=$4
+
+if [ $# != 4 ] ; then
+ echo "Need $0 <source-directory> <remote-name> <branch> <version>"
+ echo "e.g. $0 release-source bee Branch-4.0 4.0.3"
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
git checkout ${branch}
-git pull origin ${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`
fulltag=$tagbase$ver
echo " "
echo "Making $reltype for $base_pkg-$ver ..."
echo " "
-echo "OK? ctl-c to stop"
-read a
+#echo "OK? ctl-c to stop"
+#read a
rm -rf Release-$ver
if [ $reltype != "beta" ] ; then
cd src
cd po
make update-po
cd ${src}
- git commit -am "Final po changes for ${fulltag}"
fi
+
git tag -d ${fulltag}
echo "Creating new tag -- $fulltag"
git tag $fulltag
rm -rf $fulltag
cd ${src}
git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz
+
if [ $? != 0 ] ; then
echo " "
echo "Non-zero return status from Git"
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/
+# First remove Enterprise Win32 plugin source
+cd $base_pkg-$ver/bacula
+cp -fp ReleaseNotes ${cwd}/ReleaseNotes
+
+cd ${cwd}/$base_pkg-$ver
+# Move directories to release names including version
mv bacula $base_pkg-$ver
mv gui $base_pkg-gui-$ver
mv regress $base_pkg-regress-$ver
+# Tar each component individually
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
cd ..
+rm -rf $base_pkg-$ver
./sign $base_pkg-$ver.tar.gz
./sign $base_pkg-gui-$ver.tar.gz
./sign $base_pkg-regress-$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}
+++ /dev/null
-#!/bin/sh
-rm -rf bacula-* win32bacula* win64bacula*
#
# Commit all changes, export the release, make a release tar.
#
-cwd=`pwd`
-reltype=release
+# source ./config
+. ./config
+
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
+ver=$5
+fulltag=$tagbase$ver
+
+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 Branch-4.0 4.0.3"
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}
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h`
-fulltag=$tagbase$ver
+git pull ${remote} ${branch}
echo " "
echo "Making $reltype for $base_pkg-$ver ..."
echo " "
-echo "OK? ctl-c to stop"
-read a
+#echo "OK? ctl-c to stop"
+#read a
-git tag -d ${fulltag}
+git tag -d ${fulltag} 2>/dev/null 1>/dev/null
echo "Creating new tag -- $fulltag"
git tag $fulltag
if [ $? != 0 ] ; then
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}
#
# Commit all changes, export the release, make a release tar.
#
-cwd=`pwd`
-reltype=release
+# source ./config
+. ./config
+
tagbase=Release-
-base_pkg=windows
-branch=$2
+base_pkg=bacula
+remote=$2
+branch=$3
+ver=$4
+fulltag=$tagbase$ver
-if [ $# != 2 ] ; then
- echo "Need $0 <bacula-source-directory> <branch>"
- echo "e.g. $0 rescue-source master"
+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.3"
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}
-ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h`
-fulltag=$tagbase$ver
+git pull ${remote} ${branch}
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
+#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 --with-sqlite3
+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}
--- /dev/null
+#!/bin/sh
+#
+# Push tags
+#
+
+. ./config
+
+echo "Updating repo and tags for release version: ${ver}"
+
+cd $cwd
+
+fulltag=Release-$ver
+
+for i in $bacula $docs ; do
+ cd $i
+ current=`git branch | awk '/*/ { print $2 }'`
+ git checkout ${branch}
+ git push ${remote} ${branch}
+ git push ${remote} tag ${fulltag}
+ echo "Pushed ${remote} and push tag ${fulltag} in $i"
+ git checkout ${current}
+done
+