-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathinstall.sh
executable file
·53 lines (40 loc) · 1.41 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
conda activate dev
PROJECT=/Users/allwefantasy/projects/byzer-extension
MOUDLE_NAME=$1
VERSION=${VERSION:-"0.1.0-SNAPSHOT"}
V=${2:-3.3}
MIDDLE="2.4_2.11"
SPARK="spark330"
if [[ "${V}" == "2.4" ]]
then
SPARK=spark243
elif [ "${V}" == "3.0" ]; then
SPARK=spark311
elif [ "${V}" == "3.3" ]; then
SPARK=spark330
fi
if [[ "${SPARK}" == "spark330" || "${SPARK}" == "spark311" ]]
then
MIDDLE="${V}_2.12"
fi
echo ${MOUDLE_NAME}
echo ${SPARK}
echo ${MIDDLE}
mlsql_plugin_tool build --module_name ${MOUDLE_NAME} --spark ${SPARK}
mlsql_plugin_tool upload \
--module_name ${MOUDLE_NAME} \
--user ${STORE_USER} \
--password ${STORE_PASSWORD} \
--jar_path ${PROJECT}/${MOUDLE_NAME}/build/${MOUDLE_NAME}-${MIDDLE}-${VERSION}.jar
## if MOUDLE_NAME starts with byzer-objectstore-xxx, we will upload it to byzer/misc/cloud/xxx
## otherwise we will upload it to byzer-extensions/nightly-build
object_store_name=$(echo ${MOUDLE_NAME} | sed 's/byzer-objectstore-//g')
prefix="byzer-extensions/nightly-build"
if [[ "${MOUDLE_NAME}" == "byzer-objectstore"* ]]
then
prefix="byzer/misc/cloud/${object_store_name}"
fi
echo "upload ${PROJECT}/${MOUDLE_NAME}/build/${MOUDLE_NAME}-${MIDDLE}-${VERSION}.jar to ${prefix}"
curl --progress-bar \
-F "${MOUDLE_NAME}-${MIDDLE}-${VERSION}.jar=@${PROJECT}/${MOUDLE_NAME}/build/${MOUDLE_NAME}-${MIDDLE}-${VERSION}.jar" \
"${BYZER_UPLOADER_URL}&overwrite=true&pathPrefix=${prefix}" | cat