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