-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.sh
44 lines (40 loc) · 1.36 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
project='jhechem'
clearLog=false
sendWar=false
if [ -n "$1" ] ; then
project=$1
fi
if [ -n "$2" ] ; then
clearLog=$2
fi
if [ -n "$3" ] ; then
sendWar=$3
fi
if [ $sendWar = true ] ; then
if [ $project = 'jhechem' ] ; then
project='user'
scp ${project}/target/libs/${project}.war hugo@39.108.167.226:~/war/
#ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
project='order'
scp ${project}/target/libs/${project}.war hugo@39.108.167.226:~/war/
#ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
project='web'
scp ${project}/target/libs/${project}.war hugo@39.108.167.226:~/war/
#ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
else
scp ${project}/target/libs/${project}.war hugo@39.108.167.226:~/war/
#ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
fi
else
if [ $project = 'jhechem' ] ; then
project='user'
ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
project='order'
ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
project='web'
ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
else
ssh -t hugo@39.108.167.226 "sh ~/deploy.sh ${project} ${clearLog}"
fi
fi