-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci-build.sh
executable file
·58 lines (46 loc) · 1.37 KB
/
ci-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
#!/bin/bash
#------------------------------------------------------------------------
# A script to execute a build of the given type.
#
#------------------------------------------------------------------------
# Utility methods
fatal()
{
echo "ci-build.sh: fatal: $1" 1>&2
exit 1
}
info()
{
echo "ci-build.sh: info: $1" 1>&2
}
BUILD_TYPE="$1"
shift
if [ -z "${BUILD_TYPE}" ]
then
BUILD_TYPE="normal"
fi
#------------------------------------------------------------------------
# Build the project
#
info "Executing build in '${BUILD_TYPE}' mode"
JVM_ARGUMENTS="-Xmx4096m -XX:+PrintGC -XX:+PrintGCDetails -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
info "Gradle JVM arguments: ${JVM_ARGUMENTS}"
case ${BUILD_TYPE} in
normal)
./gradlew \
-Dorg.gradle.jvmargs="${JVM_ARGUMENTS}" \
-Dorg.gradle.daemon=false \
-Dorg.gradle.parallel=false \
-Dorg.gradle.internal.publish.checksums.insecure=true \
assemble check verifySemanticVersioning || fatal "could not build"
;;
pull-request)
./gradlew \
-Porg.librarysimplified.no_signing=true \
-Dorg.gradle.jvmargs="${JVM_ARGUMENTS}" \
-Dorg.gradle.daemon=false \
-Dorg.gradle.parallel=false \
-Dorg.gradle.internal.publish.checksums.insecure=true \
assemble check verifySemanticVersioning || fatal "could not build"
;;
esac