#!/bin/sh
set -x
set -o errexit

# JOB_NAME environment variable must be set. We count on Hudson for this.

controlScript=$WORKSPACE/working_copy/resources/continuous-integration/deploy/tomcat/control.sh
lastStableWAR=$WORKSPACE/working_copy/application/target/mifos-webapp.war
deployRoot=$HOME/deploys/mifos-$JOB_NAME-deploy
targetWARlocation=$deployRoot/tomcat6/webapps/mifos.war

$controlScript stop
rm -f $deployRoot/tomcat6/logs/*
rm -rf $deployRoot/tomcat6/webapps/mifos
cp $lastStableWAR $targetWARlocation
$controlScript start

#!/bin/sh
set -x
set -o errexit

# JOB_NAME environment variable must be set. We count on Hudson for this.

controlScript=$WORKSPACE/resources/continuous-integration/deploy/tomcat/control.sh
lastStableWAR=$WORKSPACE/application/target/mifos-webapp.war
deployRoot=$HOME/deploys/mifos-$JOB_NAME-deploy
targetWARlocation=$deployRoot/tomcat6/webapps/mifos.war

$controlScript stop
rm -f $deployRoot/tomcat6/logs/*
rm -rf $deployRoot/tomcat6/webapps/mifos
cp $lastStableWAR $targetWARlocation
$controlScript start

Fix paths to head working copy on Hudson server.
Fix paths to head working copy on Hudson server.

Just switched from svn to git, and the Hudson git plugin clones right to
"workspace". The Hudson svn plugin checked out to a subdirectory,
"working_copy" (possibly just due to the way we configured our Hudson
jobs).

This is similar to 7d1f2a495be472be1056f22177f6652c9ab8e09d on head, but
I didn't try to merge that in.
