#!/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 " 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 " "