Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1843 rajveer 1
#!/bin/bash
2
 
3
# resolve links - $0 may be a softlink
4
PRG="$0"
5
 
6
while [ -h "$PRG" ]; do
7
  ls=`ls -ld "$PRG"`
8
  link=`expr "$ls" : '.*-> \(.*\)$'`
9
  if expr "$link" : '/.*' > /dev/null; then
10
    PRG="$link"
11
  else
12
    PRG=`dirname "$PRG"`/"$link"
13
  fi
14
done
15
 
16
# Get standard environment variables
17
PRGDIR=`dirname $(readlink -f "$PRG")`
18
 
19
PROJECT_DIR="`dirname ${PRGDIR}`"
20
 
2858 chandransh 21
if [ $# -ne 1 ]
22
then
23
	echo "Missing argument: deployment server IP address"
24
	echo "Usage: $0 <deployment_ip>"
25
	exit 1
26
fi
1843 rajveer 27
 
2858 chandransh 28
PROD_SERVER=$1
1843 rajveer 29
 
30
 
31
MAVEN_REPO="${HOME}/.m2/repository"
2858 chandransh 32
echo "Started copying wars to ${PROD_SERVER}"
1843 rajveer 33
echo "======================================================="
34
 
35
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
36
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
37
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
2713 vikas 38
scp ${MAVEN_REPO}/in/shop2020/Crm/1.0-SNAPSHOT/Crm-1.0-SNAPSHOT.war ${PROD_SERVER}:${MAVEN_REPO}/in/shop2020/Crm/1.0-SNAPSHOT/Crm-1.0-SNAPSHOT.war
1843 rajveer 39
 
40
echo "Done copying wars to production server"
41
echo "======================================================="
42
 
2376 rajveer 43
cd ${PROJECT_DIR}
44
echo $PROJECT_DIR
2084 rajveer 45
 
46
SVN_REVISION=`svn info | grep Revision | sed "s/Revision: //"`
47
 
2376 rajveer 48
ssh ${PROD_SERVER} "echo \"${SVN_REVISION}\">/catalog-dumps/svn.revision"
2084 rajveer 49
 
2376 rajveer 50