-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathci.sh
executable file
·37 lines (31 loc) · 889 Bytes
/
ci.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
#!/usr/bin/env bash
set -e
nVersion="${GRAILS_VERSION//.}";
array=(${GRAILS_VERSION//./ })
major=${array[0]}
minor=${array[1]}
echo "Major:${major} Minor:${minor}"
echo "Using a Grails version of $GRAILS_VERSION"
source "/home/travis/.sdkman/bin/sdkman-init.sh"
sdk use grails $GRAILS_VERSION
upgrade_grails(){
if (( $major <= 2 && $minor < 4 ))
then
echo "Using 'grails upgrade' to upgrade application"
grails upgrade --non-interactive
else
echo "Using 'set-version' to upgrade application"
grails set-version $GRAILS_VERSION
grails set-grails-version $GRAILS_VERSION
fi
}
cd "grails-partition-tests"
upgrade_grails
grails clean
grails test-app --unit
grails package-plugin
cd "../app"
upgrade_grails
grails clean
grails test partition-test \"--split=1\" \"--totalSplits=2\"
grails test partition-test \"--split=2\" \"--totalSplits=2\"