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
 
21
 
22
PROD_SERVER="192.168.141.43"
23
 
24
 
25
MAVEN_REPO="${HOME}/.m2/repository"
26
echo "Started copying wars to production server"
27
echo "======================================================="
28
 
29
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
30
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
31
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
32
 
33
echo "Done copying wars to production server"
34
echo "======================================================="
35
 
2376 rajveer 36
cd ${PROJECT_DIR}
37
echo $PROJECT_DIR
2084 rajveer 38
 
39
SVN_REVISION=`svn info | grep Revision | sed "s/Revision: //"`
40
 
2376 rajveer 41
ssh ${PROD_SERVER} "echo \"${SVN_REVISION}\">/catalog-dumps/svn.revision"
2084 rajveer 42
 
2376 rajveer 43