From 1f0b9de4561d71c4e8e34072a01b272510c3a3e3 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Tue, 11 Aug 2026 13:48:23 -0400 Subject: [PATCH] fix(macos): derive bundle Info.plist version from VERSION constant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release tag bumps VERSION in src/index.tsx, but build.ts hardcoded 0.3.1 in the app bundle's plist — shipped bundles reported a stale version (lsappinfo/System Settings). Extract VERSION at bundle-assembly time and interpolate into CFBundleShortVersionString/CFBundleVersion. --- build.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build.ts b/build.ts index 3cd9d4d..65f8cd4 100644 --- a/build.ts +++ b/build.ts @@ -173,7 +173,16 @@ if (COMPILE) { ); } - // Keep CFBundleShortVersionString in sync with src/index.tsx VERSION. + // Version for the bundle comes from src/index.tsx (single source of + // truth — release.yml requires bumping it in the tag commit). + const srcIndex = await Bun.file(join("src", "index.tsx")).text(); + const versionMatch = srcIndex.match(/const VERSION = "([^"]+)"/); + const bundleVersion = versionMatch?.[1]; + if (!bundleVersion) { + console.error("Error: could not read VERSION from src/index.tsx"); + process.exit(1); + } + Bun.write( join(appRoot, "Contents", "Info.plist"), ` @@ -193,9 +202,9 @@ if (COMPILE) { CFBundleIconFile AppIcon CFBundleShortVersionString - 0.3.1 + ${bundleVersion} CFBundleVersion - 0.3.1 + ${bundleVersion} LSMinimumSystemVersion 12.0