-
Notifications
You must be signed in to change notification settings - Fork 26
/
install.sh
executable file
·57 lines (51 loc) · 2.08 KB
/
install.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
#!/bin/bash
#
# Copyright 2024 StarTree Inc
#
# Licensed under the StarTree Community License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.startree.ai/legal/startree-community-license
#
# Unless required by applicable law or agreed to in writing, software distributed under the
# License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND,
# either express or implied.
# See the License for the specific language governing permissions and limitations under
# the License.
#
# [Optional] Uncomment below lines to build with latest Pinot changes
# cd ..
# mvn install -DskipTests -pl pinot-common,pinot-core,pinot-spi,pinot-java-client -am -Pbuild-shaded-jar || exit 1
# cd thirdeye
PROFILES_ARG=""
if [ $# -ne 0 ]
then
PROFILES_ARG="-P "
for var in "$@"
do
echo "*******************************************************"
echo "Preparing build for custom datasource: $var"
echo "*******************************************************"
PROFILES_ARG=${PROFILES_ARG}${var},
case ${var} in
# [Optional] add your maven profile name and corresponding custom build here
bigquery)
# change driver version if need be. Default value is the recommended, tested version.
BQ_DRIVER_VERSION=${BQ_DRIVER_VERSION:="SimbaJDBCDriverforGoogleBigQuery42_1.2.4.1007"}
wget -N https://storage.googleapis.com/simba-bq-release/jdbc/${BQ_DRIVER_VERSION}.zip
unzip -o ${BQ_DRIVER_VERSION}.zip -d ./${BQ_DRIVER_VERSION}
# install bigQuery driver
mvn install:install-file -Dfile=./${BQ_DRIVER_VERSION}/GoogleBigQueryJDBC42.jar -DgroupId='com.simba.googlebigquery' -DartifactId='jdbc42' -Dversion='1.2.4' -Dpackaging='jar'
rm -r -d -f ./${BQ_DRIVER_VERSION}
;;
*)
echo "Unkown custom datasource argument ${var}. Aborting build."
exit 1
;;
esac
done
PROFILES_ARG=${PROFILES_ARG%,}
fi
echo "*******************************************************"
echo "Building ThirdEye"
echo "*******************************************************"
mvn install -DskipTests ${PROFILES_ARG}|| exit 1