From 1e86cebd74a5723e818b5c0555276b646bcf0e4c Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Tue, 16 Dec 2025 19:53:05 -0800 Subject: [PATCH] Add bun_version to link metadata (#25545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Add `bun_version` field to `link-metadata.json` - Pass `VERSION` CMake variable to the metadata script as `BUN_VERSION` env var This ensures the build version is captured in the link metadata JSON file, which is useful for tracking which version produced a given build artifact. ## Test plan - Build with `bun bd` and verify `link-metadata.json` includes `bun_version` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude --- cmake/targets/BuildBun.cmake | 1 + scripts/create-link-metadata.mjs | 1 + 2 files changed, 2 insertions(+) diff --git a/cmake/targets/BuildBun.cmake b/cmake/targets/BuildBun.cmake index 5802a46133..74580efaf9 100644 --- a/cmake/targets/BuildBun.cmake +++ b/cmake/targets/BuildBun.cmake @@ -1210,6 +1210,7 @@ if(BUN_LINK_ONLY) "Uploading link metadata" COMMAND ${CMAKE_COMMAND} -E env + BUN_VERSION=${VERSION} WEBKIT_DOWNLOAD_URL=${WEBKIT_DOWNLOAD_URL} WEBKIT_VERSION=${WEBKIT_VERSION} ZIG_COMMIT=${ZIG_COMMIT} diff --git a/scripts/create-link-metadata.mjs b/scripts/create-link-metadata.mjs index 39042420d6..037a62c30b 100644 --- a/scripts/create-link-metadata.mjs +++ b/scripts/create-link-metadata.mjs @@ -31,6 +31,7 @@ const symbolsTxt = await Bun.file(join(repoRoot, "src", "symbols.txt")).text(); // Create metadata JSON with link command included const metadata = { + bun_version: process.env.BUN_VERSION || "", webkit_url: process.env.WEBKIT_DOWNLOAD_URL || "", webkit_version: process.env.WEBKIT_VERSION || "", zig_commit: process.env.ZIG_COMMIT || "",