@@ -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,26 @@ 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+
149+ # Note: Bun is only available for Windows x64, not for win-x86 (32-bit Windows)
150+ if [[ " $PACKAGERUNTIME " == " win-x64" ]]; then
151+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-windows-x64.zip" bun/bin fix_nested_dir
152+ fi
153+
145154 if [[ " $PRECACHE " != " " ]]; then
146155 acquireExternalTool " https://github.com/microsoft/vswhere/releases/download/2.6.7/vswhere.exe" vswhere
147156 fi
148157fi
149158
150- # Download the external tools only for Windows.
159+ # Download the external tools only for Windows ARM64.
160+ # Note: Bun doesn't have official Windows ARM64 release yet, so we skip it for now.
151161if [[ " $PACKAGERUNTIME " == " win-arm64" ]]; then
152162 # todo: replace these with official release when available
153163 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /$PACKAGERUNTIME /node.exe" node20/bin
154164 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /$PACKAGERUNTIME /node.lib" node20/bin
155165 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /$PACKAGERUNTIME /node.exe" node24/bin
156166 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /$PACKAGERUNTIME /node.lib" node24/bin
167+
157168 if [[ " $PRECACHE " != " " ]]; then
158169 acquireExternalTool " https://github.com/microsoft/vswhere/releases/download/2.6.7/vswhere.exe" vswhere
159170 fi
163174if [[ " $PACKAGERUNTIME " == " osx-x64" ]]; then
164175 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -darwin-x64.tar.gz" node20 fix_nested_dir
165176 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -darwin-x64.tar.gz" node24 fix_nested_dir
177+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-darwin-x64.zip" bun/bin fix_nested_dir
166178fi
167179
168180if [[ " $PACKAGERUNTIME " == " osx-arm64" ]]; then
169181 # node.js v12 doesn't support macOS on arm64.
170182 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -darwin-arm64.tar.gz" node20 fix_nested_dir
171183 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -darwin-arm64.tar.gz" node24 fix_nested_dir
184+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-darwin-aarch64.zip" bun/bin fix_nested_dir
172185fi
173186
174187# Download the external tools for Linux PACKAGERUNTIMEs.
@@ -177,11 +190,15 @@ if [[ "$PACKAGERUNTIME" == "linux-x64" ]]; then
177190 acquireExternalTool " $NODE_ALPINE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -alpine-x64.tar.gz" node20_alpine
178191 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -linux-x64.tar.gz" node24 fix_nested_dir
179192 acquireExternalTool " $NODE_ALPINE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -alpine-x64.tar.gz" node24_alpine
193+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-x64.zip" bun/bin fix_nested_dir
194+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-x64-musl.zip" bun_alpine/bin fix_nested_dir
180195fi
181196
182197if [[ " $PACKAGERUNTIME " == " linux-arm64" ]]; then
183198 acquireExternalTool " $NODE_URL /v${NODE20_VERSION} /node-v${NODE20_VERSION} -linux-arm64.tar.gz" node20 fix_nested_dir
184199 acquireExternalTool " $NODE_URL /v${NODE24_VERSION} /node-v${NODE24_VERSION} -linux-arm64.tar.gz" node24 fix_nested_dir
200+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-aarch64.zip" bun/bin fix_nested_dir
201+ acquireExternalTool " $BUN_URL /bun-v${BUN_VERSION} /bun-linux-aarch64-musl.zip" bun_alpine/bin fix_nested_dir
185202fi
186203
187204if [[ " $PACKAGERUNTIME " == " linux-arm" ]]; then
0 commit comments