From dd9a97d6d704d62bdc636c533e48b5db975352c6 Mon Sep 17 00:00:00 2001 From: riyadhafraa <49757212-riyadhafraa@users.noreply.replit.com> Date: Tue, 19 May 2026 14:21:09 +0000 Subject: [PATCH] Update versioning to increment on every deployment Modify `scripts/update-version.mjs` to always increment the deploy count and version number on each build or redeploy, regardless of commit changes. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 77cfe984-2c65-4152-bb7a-0df28274fe66 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 5ab4011a-b584-477f-8d7b-208977da4a87 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/c3c252e4-c83d-40ca-9fff-99a3ea60701e/77cfe984-2c65-4152-bb7a-0df28274fe66/IO8TMSC Replit-Helium-Checkpoint-Created: true --- scripts/update-version.mjs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) 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}`, +);