-
Notifications
You must be signed in to change notification settings - Fork 5
/
deploy.sh
executable file
·48 lines (37 loc) · 1.2 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
42
43
44
45
46
47
48
#!/usr/bin/env -S bash -e
SCRIPTS_DIR="$(readlink -f ${BASH_SOURCE[0]} | xargs dirname)"
PROJECT=$1
WORKSPACE=${WORKSPACE:-'.'}
pushd ${WORKSPACE}
if [ -z "$PROJECT" ]; then
echo "ERROR: Project not supplied"
exit 1
fi
if [ "$PROJECT" == "orm" ] || [ "$PROJECT" == "reactive" ]; then
PROJECT_NAME=$([ "$PROJECT" == "orm" ] && echo "ORM" || echo "Reactive")
echo "ERROR: deploy.sh should not be used with $PROJECT_NAME, use publish.sh instead"
exit 1
fi
if [ -f "./gradlew" ]; then
# Gradle-based build
./gradlew --no-scan --no-daemon --no-build-cache publish
else
# Maven-based build
if [ "$PROJECT" == "ogm" ]; then
ADDITIONAL_OPTIONS="-DmongodbProvider=external -DskipITs"
else
ADDITIONAL_OPTIONS=""
fi
source "$SCRIPTS_DIR/mvn-setup.sh"
./mvnw clean deploy \
-Pdocbook,documentation-pdf,dist,perf,relocation,release \
-DperformRelease=true \
-DskipTests=true -Dcheckstyle.skip=true \
-Dmaven.compiler.useIncrementalCompilation=false \
-Ddevelocity.enabled=false \
-Dscan=false -Dno-build-cache \
-Dgradle.cache.remote.enabled=false -Dgradle.cache.local.enabled=false \
-Ddevelocity.cache.remote.enabled=false -Ddevelocity.cache.local.enabled=false \
$ADDITIONAL_OPTIONS
fi
popd