File tree Expand file tree Collapse file tree 3 files changed +1817
-1797
lines changed Expand file tree Collapse file tree 3 files changed +1817
-1797
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,17 @@ cd "${SCRIPT_DIR}/.."
10
10
# https://rustup.rs/
11
11
if ! hash rustup 2> /dev/null; then
12
12
curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path -y
13
- PATH=" $HOME /.cargo/bin:$PATH "
13
+ export PATH=" $HOME /.cargo/bin:$PATH "
14
14
fi
15
15
16
16
17
17
# wasm-pack
18
18
# wasm-pack will be installed by npm package
19
19
# https://rustwasm.github.io/wasm-pack/installer/
20
20
if ! hash wasm-pack 2> /dev/null; then
21
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
21
+ # curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
22
+ cargo install wasm-pack --version 0.9.1
23
+ export PATH=" $HOME /.cargo/bin:$PATH "
22
24
fi
23
25
24
26
# copy wasm-pack
45
47
46
48
export PATH=$PATH
47
49
50
+
51
+ node_version=$( node -v)
52
+
53
+
54
+ if [[ " $node_version " =~ v([0-9]+)\. ([0-9]+)\. ([0-9]+) ]]; then
55
+ major_version=${BASH_REMATCH[1]}
56
+
57
+ if [[ $major_version -ge 17 ]]; then
58
+ echo " Node.js version is $node_version . Enabling legacy OpenSSL provider..."
59
+ export NODE_OPTIONS=--openssl-legacy-provider
60
+ else
61
+ echo " Node.js version is $node_version . No need to enable legacy OpenSSL provider."
62
+ fi
63
+ else
64
+ echo " Could not determine Node.js version."
65
+ fi
66
+
48
67
# yarn install
49
68
yarn install --frozen-lockfile --network-timeout 1000000
50
69
You can’t perform that action at this time.
0 commit comments