@@ -9,6 +9,9 @@ NODE_ALPINE_URL=https://github.com/actions/alpine_nodejs/releases/download
99NODE20_VERSION=" 20.19.5"
1010NODE24_VERSION=" 24.11.1"
1111
12+ BUN_URL=https://github.com/oven-sh/bun/releases/download
13+ BUN_VERSION=" 1.3.2"
14+
1215get_abs_path () {
1316 # exploits the fact that pwd will print abs path when no args
1417 echo " $( cd " $( dirname " $1 " ) " && pwd) /$( basename " $1 " ) "
@@ -142,18 +145,21 @@ if [[ "$PACKAGERUNTIME" == "win-x64" || "$PACKAGERUNTIME" == "win-x86" ]]; then
142145 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /$PACKAGERUNTIME /node.lib" node20/bin
143146 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /$PACKAGERUNTIME /node.exe" node24/bin
144147 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /$PACKAGERUNTIME /node.lib" node24/bin
148+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-windows-x64.zip" bun/bin fix_nested_dir
145149 if [[ " $PRECACHE " != " " ]]; then
146150 acquireExternalTool " https://github.com/microsoft/vswhere/releases/download/2.6.7/vswhere.exe" vswhere
147151 fi
148152fi
149153
150- # Download the external tools only for Windows.
154+ # Download the external tools only for Windows ARM64.
155+ # Note: Bun doesn't have official Windows ARM64 release yet, so we skip it for now
151156if [[ " $PACKAGERUNTIME " == " win-arm64" ]]; then
152157 # todo: replace these with official release when available
153158 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /$PACKAGERUNTIME /node.exe" node20/bin
154159 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /$PACKAGERUNTIME /node.lib" node20/bin
155160 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /$PACKAGERUNTIME /node.exe" node24/bin
156161 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /$PACKAGERUNTIME /node.lib" node24/bin
162+ # Bun Windows ARM64 not available yet
157163 if [[ " $PRECACHE " != " " ]]; then
158164 acquireExternalTool " https://github.com/microsoft/vswhere/releases/download/2.6.7/vswhere.exe" vswhere
159165 fi
163169if [[ " $PACKAGERUNTIME " == " osx-x64" ]]; then
164170 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -darwin-x64.tar.gz" node20 fix_nested_dir
165171 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -darwin-x64.tar.gz" node24 fix_nested_dir
172+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-darwin-x64.zip" bun/bin fix_nested_dir
166173fi
167174
168175if [[ " $PACKAGERUNTIME " == " osx-arm64" ]]; then
169176 # node.js v12 doesn't support macOS on arm64.
170177 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -darwin-arm64.tar.gz" node20 fix_nested_dir
171178 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -darwin-arm64.tar.gz" node24 fix_nested_dir
179+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-darwin-aarch64.zip" bun/bin fix_nested_dir
172180fi
173181
174182# Download the external tools for Linux PACKAGERUNTIMEs.
@@ -177,11 +185,15 @@ if [[ "$PACKAGERUNTIME" == "linux-x64" ]]; then
177185 acquireExternalTool " $NODE_ALPINE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -alpine-x64.tar.gz" node20_alpine
178186 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -linux-x64.tar.gz" node24 fix_nested_dir
179187 acquireExternalTool " $NODE_ALPINE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -alpine-x64.tar.gz" node24_alpine
188+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-x64.zip" bun/bin fix_nested_dir
189+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-x64-musl.zip" bun_alpine/bin fix_nested_dir
180190fi
181191
182192if [[ " $PACKAGERUNTIME " == " linux-arm64" ]]; then
183193 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -linux-arm64.tar.gz" node20 fix_nested_dir
184194 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -linux-arm64.tar.gz" node24 fix_nested_dir
195+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-aarch64.zip" bun/bin fix_nested_dir
196+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-aarch64-musl.zip" bun_alpine/bin fix_nested_dir
185197fi
186198
187199if [[ " $PACKAGERUNTIME " == " linux-arm" ]]; then
0 commit comments