-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgo.sh
executable file
·76 lines (55 loc) · 998 Bytes
/
go.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
if [ $# -eq 0 ]
then
ver=( $(<~/sonarVersions/default.txt) )
else
ver=$1
fi
currentDir=${PWD##*/}
if [[ $currentDir == sonar-enterprise ]]
then
/bin/bash ~/scripts/platformSnapshot.sh
exit
fi
if [[ $currentDir != sonar-* ]]
then
echo
echo Running downloaded SQ
echo
/bin/bash ~/scripts/runDownload.sh
exit
fi
# run rebuild script
/bin/bash ~/scripts/rebuild.sh
rc=$?
if [[ $rc != 0 ]]
then
echo "Plugin build failed!"
exit $rc
fi
jar=target/${currentDir}-plugin-*SNAPSHOT.jar
if [ -d "${currentDir}" ]
then
jar="${currentDir}/${jar}"
fi
if [ -d "${currentDir}-plugin" ]
then
jar="${currentDir}-plugin/${jar}"
fi
#resolve wildcards
jar=$(ls $jar)
if [ ! -e "$jar" ]
then
jar=target/${currentDir}-plugin.jar
if [ -d "${currentDir}" ]
then
jar="${currentDir}/${jar}"
fi
if [ -d "${currentDir}-plugin" ]
then
jar="${currentDir}-plugin/${jar}"
fi
fi
echo $jar
# run mvstart script
/bin/bash ~/scripts/mvstart.sh $jar $ver