forked from pingcap/tidb-engine-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·30 lines (23 loc) · 914 Bytes
/
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
#!/bin/bash
set -e
source env.sh
echo "profile is ${PROXY_PROFILE}"
echo "engine is ${ENGINE_LABEL_VALUE}"
echo "prometheus metric name prefix is ${PROMETHEUS_METRIC_NAME_PREFIX}"
lib_suffix="so"
if [[ $(uname -s) == "Darwin" ]]; then
lib_suffix="dylib"
# use the openssl 1.1 lib from system
export OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR:-$(brew --prefix [email protected])}
echo "OPENSSL_ROOT_DIR: ${OPENSSL_ROOT_DIR}"
export OPENSSL_NO_VENDOR=1
export OPENSSL_STATIC=1
fi
PROXY_ENABLE_FEATURES=${PROXY_ENABLE_FEATURES} ./cargo-build.sh
target_name="lib${ENGINE_LABEL_VALUE}_proxy.${lib_suffix}"
ori_build_path="target/${PROXY_PROFILE}/libraftstore_proxy.${lib_suffix}"
target_path=${PROXY_LIB_TARGET_COPY_PATH-"target/${PROXY_PROFILE}/${target_name}"}
echo "forcibly remove ${target_path}"
rm -rf "${target_path}"
echo "copy ${ori_build_path} to ${target_path}"
cp "${ori_build_path}" "${target_path}"