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
This commit is contained in:
@@ -54,12 +54,9 @@ 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 {
|
||||
// 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 };
|
||||
@@ -67,4 +64,3 @@ if (current.build === build) {
|
||||
console.log(
|
||||
`[update-version] ${current.build} -> ${build} | ${current.version ?? "<none>"} -> ${version}`,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user