Subversion Repositories SmartDukaan

Rev

Rev 1843 | Blame | Last modification | View Log | RSS feed

#!/bin/bash

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ]; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done

# Get standard environment variables
PRGDIR=`dirname $(readlink -f "$PRG")`

PROJECT_DIR="`dirname ${PRGDIR}`"


PROD_SERVER="192.168.141.43"


MAVEN_REPO="${HOME}/.m2/repository"
echo "Started copying wars to production server"
echo "======================================================="

scp ${MAVEN_REPO}/in/shop2020/Website/1.0-SNAPSHOT/Website-1.0-SNAPSHOT.war ${PROD_SERVER}:${MAVEN_REPO}/in/shop2020/Website/1.0-SNAPSHOT/Website-1.0-SNAPSHOT.war
scp ${MAVEN_REPO}/in/shop2020/Support/1.0-SNAPSHOT/Support-1.0-SNAPSHOT.war ${PROD_SERVER}:${MAVEN_REPO}/in/shop2020/Support/1.0-SNAPSHOT/Support-1.0-SNAPSHOT.war
scp ${MAVEN_REPO}/in/shop2020/Social/1.0-SNAPSHOT/Social-1.0-SNAPSHOT.war ${PROD_SERVER}:${MAVEN_REPO}/in/shop2020/Social/1.0-SNAPSHOT/Social-1.0-SNAPSHOT.war

echo "Done copying wars to production server"
echo "======================================================="

cd /code/trunk/

SVN_REVISION=`svn info | grep Revision | sed "s/Revision: //"`
ssh ${PROD_SERVER} "echo ${SVN_REVISION}>/catalog-dumps/svn.revision"