forked from mock-server/mockserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtravis_build.sh
executable file
·59 lines (55 loc) · 1.88 KB
/
travis_build.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
#!/usr/bin/env bash
export MAVEN_OPTS='-XX:MaxPermSize=1024m -Xmx1024m'
export JAVA_OPTS='-XX:MaxPermSize=1024m -Xmx1024m'
JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
current_directory=${PWD}
if [ $JAVA_VER -eq 16 ]; then
echo
echo "------------------------"
echo "------- JAVA 1.6 -------"
echo "------------------------"
echo
rm -rf $current_directory/target/travis
git clone -b travis `git config --get remote.origin.url` $current_directory/target/travis
for module in . core client-java integration-testing war proxy-war netty maven-plugin maven-plugin-integration-tests client-javascript client-ruby examples; do
cd $current_directory/mockserver-$module;
echo
echo ==== `pwd` =====;
echo
mvn -q install --settings $current_directory/target/travis/settings.xml
echo
cd $current_directory;
done
fi
if [ $JAVA_VER -eq 17 ]; then
echo
echo "--------------------"
echo "----- JAVA 1.7 -----"
echo "--------------------"
echo
for module in . core client-java integration-testing war proxy-war netty maven-plugin maven-plugin-integration-tests client-javascript client-ruby examples; do
cd $current_directory/mockserver-$module;
echo
echo ==== `pwd` ====;
echo
mvn -q install
echo
cd $current_directory;
done
fi
if [ $JAVA_VER -eq 18 ]; then
echo
echo "--------------------"
echo "----- JAVA 1.8 -----"
echo "--------------------"
echo
for module in . core client-java integration-testing war proxy-war netty maven-plugin maven-plugin-integration-tests client-javascript client-ruby examples; do
cd $current_directory/mockserver-$module;
echo
echo ==== `pwd` ====;
echo
mvn -q install
echo
cd $current_directory;
done
fi