diff --git a/scripts/update-version.mjs b/scripts/update-version.mjs index bf1be1ab..b01392b7 100644 --- a/scripts/update-version.mjs +++ b/scripts/update-version.mjs @@ -54,17 +54,13 @@ let deployCount = Number.isInteger(current.deployCount) return m ? parseInt(m[1], 10) : 0; })(); -if (current.build === build) { - // No new commit since last run -> nothing to do. Don't bump the - // counter and don't rewrite the file. This matches pre-#597 behaviour - // so re-running the build twice in CI doesn't inflate the counter. - console.log(`[update-version] build unchanged: ${build}`); -} else { - deployCount += 1; - const version = `${baseVersion}.${deployCount}`; - const next = { baseVersion, version, build, deployCount }; - writeFileSync(versionPath, JSON.stringify(next, null, 2) + "\n"); - console.log( - `[update-version] ${current.build} -> ${build} | ${current.version ?? ""} -> ${version}`, - ); -} +// Always bump on every build/redeploy, even when the commit hash hasn't +// changed. The user wants the version label to reflect every deploy so +// they can confirm a redeploy actually rolled out new code on the Mac. +deployCount += 1; +const version = `${baseVersion}.${deployCount}`; +const next = { baseVersion, version, build, deployCount }; +writeFileSync(versionPath, JSON.stringify(next, null, 2) + "\n"); +console.log( + `[update-version] ${current.build} -> ${build} | ${current.version ?? ""} -> ${version}`, +);