Skip to content

Commit ae37fbf

Browse files
Update build.sh
1 parent 08dc50b commit ae37fbf

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

build.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash -e
22

3-
echo "in build.sh"
4-
53
ADDON_ARCH="$1"
64
LANGUAGE_NAME="$2"
75
LANGUAGE_VERSION="$3"
@@ -48,16 +46,22 @@ function install_linux_cross_compiler() {
4846
}
4947

5048
function build_native() {
51-
python -m pip install -U pip
52-
python -m pip install -U setuptools wheel
5349
ADDON_ARCH=${ADDON_ARCH} ./package.sh
5450
}
5551

5652
function build_cross_compiled() {
5753
docker run --rm -t -v $PWD:/build webthingsio/toolchain-${ADDON_ARCH}-${LANGUAGE_NAME}-${LANGUAGE_VERSION} bash -c "cd /build; ADDON_ARCH=${ADDON_ARCH} ./package.sh"
5854
}
5955

60-
case "${ADDON_ARCH}" in
56+
if [[ $LANGUAGE_VERSION -gt 14 ]]
57+
then
58+
echo "The node version is greater than 14."
59+
install_linux_cross_compiler
60+
build_native
61+
62+
else
63+
echo "The node version is 14 or less."
64+
case "${ADDON_ARCH}" in
6165
darwin-x64)
6266
install_osx_compiler
6367
build_native
@@ -82,4 +86,6 @@ case "${ADDON_ARCH}" in
8286
echo "Unsupported architecture"
8387
exit 1
8488
;;
85-
esac
89+
esac
90+
91+
fi

0 commit comments

Comments
 (0)