]> git.sur5r.net Git - bacula/bacula/commitdiff
Add release scripts
authorKern Sibbald <kern@sibbald.com>
Wed, 14 Oct 2009 19:42:35 +0000 (21:42 +0200)
committerKern Sibbald <kern@sibbald.com>
Wed, 14 Oct 2009 19:42:35 +0000 (21:42 +0200)
bacula/release/makebacularel [new file with mode: 0755]
bacula/release/makeclean [new file with mode: 0755]
bacula/release/makedocsrel [new file with mode: 0755]
bacula/release/makerescuerel [new file with mode: 0755]
bacula/release/makewinrel [new file with mode: 0755]
bacula/release/sign [new file with mode: 0755]

diff --git a/bacula/release/makebacularel b/bacula/release/makebacularel
new file mode 100755 (executable)
index 0000000..0f9c93e
--- /dev/null
@@ -0,0 +1,106 @@
+#!/bin/sh
+#
+#
+# This script is used to make a Bacula release
+#   bacula
+#   regress
+#   gui
+# It writes in the current directory, so we recommend that you
+#  do not run it in the Bacula source or Git directory, but
+#  in a special release directory.
+#
+# Commit all changes, update the language files, 
+#    export the release, make a release tar.
+#
+cwd=`pwd`
+reltype=release
+tagbase=Release-
+base_pkg=bacula
+if [ $# != 2 ] ; then
+  echo "Need $0 <source-directory> <branch>"
+  echo "e.g. $0 release-source 3.0.3"
+  exit 1
+fi
+cd $1
+if [ $? -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+src=`pwd` 
+cd $base_pkg 
+if [ $?  -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+branch=$2
+git checkout ${branch}
+git pull origin ${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
+rm -rf Release-$ver
+if [ $reltype != "beta" ] ; then
+   cd src
+   cp -fp version.h 1
+   sed 's%^#define DEVELOPER 1%/* #define DEVELOPER 1 */%g' 1 >version.h
+   rm -f 1
+   cd ..
+fi
+./configure --enable-client-only
+cd po
+make update-po
+cd ${src}   
+git commit -am "Final po changes for ${fulltag}"
+git tag -d ${fulltag}
+echo "Creating new tag -- $fulltag"
+git tag $fulltag -m "Create tag $fulltag"
+if [ $? != 0 ] ; then
+  echo " "
+  echo "Non-zero return status from Git"
+  echo " "
+  exit 1
+fi
+echo "Create Tag $fulltag done"
+cd ${cwd}
+rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
+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"
+  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/
+mv bacula $base_pkg-$ver
+mv gui $base_pkg-gui-$ver
+mv regress $base_pkg-regress-$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
+cd ..
+./sign $base_pkg-$ver.tar.gz
+./sign $base_pkg-gui-$ver.tar.gz
+./sign $base_pkg-regress-$ver.tar.gz
+
+echo " "
+echo "If everything is OK, don't forget to push $src tags to the repo"
+echo " "
+
+# Need to do docs and rescue
+#mv docs $base_pkg-docs-$ver
+#./makereldocs $ver
+#mv rescue $base_pkg-rescue-$ver
diff --git a/bacula/release/makeclean b/bacula/release/makeclean
new file mode 100755 (executable)
index 0000000..ec44b8b
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+rm -rf bacula-* winbacula* win64bacula*
diff --git a/bacula/release/makedocsrel b/bacula/release/makedocsrel
new file mode 100755 (executable)
index 0000000..247eeb4
--- /dev/null
@@ -0,0 +1,109 @@
+#!/bin/sh
+#
+#
+# This script is used to make a Bacula docs release
+#   docs
+# It writes in the current directory, so we recommend that you
+#  do not run it in the Bacula source or Git directory, but
+#  in a special release directory.
+#
+# Commit all changes, export the release, make a release tar.
+#
+cwd=`pwd`
+reltype=release
+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"
+  exit 1
+fi
+cd $1
+if [ $? -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+cd bacula
+if [ $?  -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+git checkout ${branch}
+if [ $? -ne 0 ]; then
+   echo "Checkout of branch ${branch} in $1/bacula failed."
+   exit 1
+fi
+git pull origin ${branch}
+bsrc=`pwd` 
+cd ${cwd}
+cd $2
+if [ $? -ne 0 ]; then
+   echo "Directory: $2 does not exist"
+   exit 1
+fi
+cd $base_dir
+if [ $?  -ne 0 ]; then
+   echo "Directory: $2 does not exist"
+   exit 1
+fi
+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
+echo " "
+echo "Making $reltype for $base_pkg-$ver ..."
+echo " "
+echo "OK?  ctl-c to stop"
+read a
+
+git tag -d ${fulltag}
+echo "Creating new tag -- $fulltag"
+git tag $fulltag -m "Create tag $fulltag"
+if [ $? != 0 ] ; then
+  echo " "
+  echo "Non-zero return status from Git"
+  echo " "
+  exit 1
+fi
+echo "Create Tag $fulltag done"
+cd ${cwd}
+rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
+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"
+  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/
+mv docs $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
+rm -rf $base_pkg-$ver $base_pkg-$ver.tar.*
+echo "bzip2 docs ..."
+bzip2 $base_pkg-$ver.tar
+./sign $base_pkg-$ver.tar.bz2
+ls -l $base_pkg-$ver.tar.*
+
+echo " "
+echo "If everything is OK, don't forget to push $src tags to the repo"
+echo " "
diff --git a/bacula/release/makerescuerel b/bacula/release/makerescuerel
new file mode 100755 (executable)
index 0000000..c48b530
--- /dev/null
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+#
+# This script is used to make a Bacula rescue release
+#   rescue
+# It writes in the current directory, so we recommend that you
+#  do not run it in the Bacula source or Git directory, but
+#  in a special release directory.
+#
+# Commit all changes, export the release, make a release tar.
+#
+cwd=`pwd`
+reltype=release
+tagbase=Release-
+base_pkg=bacula-rescue
+base_dir=rescue
+branch=$2
+ver=$2
+if [ $# != 2 ] ; then
+  echo "Need $0 <rescue-source-directory> <branch>"
+  echo "e.g. $0 rescue-source master"
+  exit 1
+fi
+cd $1
+if [ $? -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+cd $base_dir
+if [ $?  -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+src=`pwd` 
+git checkout ${branch}
+if [ $? -ne 0 ]; then
+   echo "Checkout of branch ${branch} in ${src} failed."
+   exit 1
+fi
+git pull origin ${branch}
+fulltag=$tagbase$ver
+echo " "
+echo "Making $reltype for $base_pkg-$ver ..."
+echo " "
+echo "OK?  ctl-c to stop"
+read a
+
+git tag -d ${fulltag}
+echo "Creating new tag -- $fulltag"
+git tag $fulltag -m "Create tag $fulltag"
+if [ $? != 0 ] ; then
+  echo " "
+  echo "Non-zero return status from Git"
+  echo " "
+  exit 1
+fi
+echo "Create Tag $fulltag done"
+cd ${cwd}
+rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig
+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"
+  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.*
+
+echo " "
+echo "If everything is OK, don't forget to push $src tags to the repo"
+echo " "
diff --git a/bacula/release/makewinrel b/bacula/release/makewinrel
new file mode 100755 (executable)
index 0000000..4d60d3b
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+#
+# This script is used to make a Bacula win32 and win64 releases
+# 
+# It writes in the current directory, so we recommend that you
+#  do not run it in the Bacula source or Git directory, but
+#  in a special release directory.
+#
+# Commit all changes, export the release, make a release tar.
+#
+cwd=`pwd`
+reltype=release
+tagbase=Release-
+base_pkg=windows
+branch=$2
+ver=$2
+if [ $# != 2 ] ; then
+  echo "Need $0 <rescue-source-directory> <branch>"
+  echo "e.g. $0 rescue-source master"
+  exit 1
+fi
+cd $1
+if [ $? -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+cd bacula
+if [ $?  -ne 0 ]; then
+   echo "Directory: $1 does not exist"
+   exit 1
+fi
+src=`pwd` 
+git checkout ${branch}
+if [ $? -ne 0 ]; then
+   echo "Checkout of branch ${branch} in ${src} failed."
+   exit 1
+fi
+git pull origin ${branch}
+fulltag=$tagbase$ver
+echo " "
+echo "Making $reltype for $base_pkg-$ver ..."
+echo " "
+echo "OK?  ctl-c to stop"
+read a
+
+cd src/win32
+rm -f release32/winbacula-$ver.exe
+rm -f release64/win64bacula-$ver.exe
+make clean
+./makeall
+cp release32/winbacula-$ver.exe ${cwd}
+cp release64/win64bacula-$ver.exe ${cwd}
+git checkout master
+cd ${cwd}
+rm -f *.exe.sig
+./sign winbacula-$ver.exe
+./sign win64bacula-$ver.exe
+ls -l win*.exe*
+
+echo " "
+echo "If everything is OK, don't forget to push $src tags to the repo"
+echo " "
diff --git a/bacula/release/sign b/bacula/release/sign
new file mode 100755 (executable)
index 0000000..964780d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+gpg --detach-sign --armor --default-key bacula -o $1.sig $1
+gpg --verify $1.sig