From a5addc13c0eab1575cc9c14048badf6ee46b2fc5 Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Sun, 22 Nov 2026 23:04:39 +0100 Subject: [PATCH 1/3] Release: the next minor version has no patch, 1.4.1 to 1.5 Co-Authored-By: Claude --- AGENTS.md | 7 ++++--- Tools/Release/README.md | 4 ++-- Tools/Release/lib.js | 5 ++--- Tools/Release/release.test.js | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b0c6f0d..c7471d6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -286,9 +286,10 @@ would want. - A production release on Play is two uploads of one commit: the non-beta build to production as a draft the person rolls out, and the beta build to every testing track. Never promote a testing build to production. -- A game moves to the next minor version (x.y.z to x.(y+1).0) once its - current version has an approved release on either store; until then each - build keeps the version and takes only the next build number. +- A game moves to the next minor version, with no patch (x.y.z to x.(y+1): + 1.4.1 to 1.5, never 1.5.0), once its current version has an approved + release on either store; until then each build keeps the version and takes + only the next build number. - Google Play goes through the runtime's `Tools/Play/play.js` (its README), run through the game's own two-line `play.js` with its `listing.json` and `play.json`: never `gplay` writes of your own, and never a copy of the diff --git a/Tools/Release/README.md b/Tools/Release/README.md index 7ba70a6..e4ecd88 100644 --- a/Tools/Release/README.md +++ b/Tools/Release/README.md @@ -115,8 +115,8 @@ Tools/Release/nightly.sh --notes notes.txt # the release (the nigh 2. **Worktree.** Everything happens in a throwaway worktree of the branch, with the runtime submodule, removed at the end; the checkout it's run from is only fetched. -3. **Version.** The minor goes up (1.7 → 1.8, 1.4.1 → 1.5.0) once the - version has an approved release on either store: an App Store version +3. **Version.** The minor goes up, with no patch (1.7 → 1.8, 1.4.1 → 1.5), + once the version has an approved release on either store: an App Store version Apple approved (waiting for release, live, or later replaced or removed), or a production release on Play that names the version and that Google approved (`play.js versions --approved`). Then the next build number. Both diff --git a/Tools/Release/lib.js b/Tools/Release/lib.js index e4316a4..fb080a8 100644 --- a/Tools/Release/lib.js +++ b/Tools/Release/lib.js @@ -44,15 +44,14 @@ function withVersion(text, from, to) { (value.replace(/"/g, '').trim() === from ? `MARKETING_VERSION = ${to};` : line)); } -// The next minor version, with as many parts as this one: 1.7 → 1.8, -// 1.4.1 → 1.5.0. +// The next minor version, with no patch: 1.7 → 1.8, 1.4.1 → 1.5. function bumpMinor(version) { const parts = String(version).split('.'); const [major, minor] = parts.map(Number); if (parts.length < 2 || parts.length > 3 || !Number.isInteger(major) || !Number.isInteger(minor)) { throw new Error(`MARKETING_VERSION isn't x.y or x.y.z: ${version}`); } - return parts.length === 2 ? `${major}.${minor + 1}` : `${major}.${minor + 1}.0`; + return `${major}.${minor + 1}`; } // --- Build numbers -------------------------------------------------------- diff --git a/Tools/Release/release.test.js b/Tools/Release/release.test.js index 2da40d4..5aed671 100644 --- a/Tools/Release/release.test.js +++ b/Tools/Release/release.test.js @@ -26,8 +26,8 @@ test('the project: the app target is the last value; a bump leaves other targets test('the minor goes up with as many parts as the version has', () => { assert.strictEqual(lib.bumpMinor('1.7'), '1.8'); - assert.strictEqual(lib.bumpMinor('1.4.1'), '1.5.0'); - assert.strictEqual(lib.bumpMinor('1.5.0'), '1.6.0'); + assert.strictEqual(lib.bumpMinor('1.4.1'), '1.5'); + assert.strictEqual(lib.bumpMinor('1.5.0'), '1.6'); assert.strictEqual(lib.bumpMinor('2.9'), '2.10'); assert.throws(() => lib.bumpMinor('7'), /x\.y/); }); From 61247f7a75164560b22fd59d54676ca9c7200dae Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Sun, 22 Nov 2026 23:06:38 +0100 Subject: [PATCH 2/3] Release: a patch of 0 is left off; any other patch stays Co-Authored-By: Claude --- AGENTS.md | 8 ++++---- Tools/Release/README.md | 4 ++-- Tools/Release/lib.js | 12 +++++++++--- Tools/Release/release.test.js | 4 ++++ 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index c7471d6..d5b01ea 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -286,10 +286,10 @@ would want. - A production release on Play is two uploads of one commit: the non-beta build to production as a draft the person rolls out, and the beta build to every testing track. Never promote a testing build to production. -- A game moves to the next minor version, with no patch (x.y.z to x.(y+1): - 1.4.1 to 1.5, never 1.5.0), once its current version has an approved - release on either store; until then each build keeps the version and takes - only the next build number. +- A game moves to the next minor version (x.y.z to x.(y+1).0) once its + current version has an approved release on either store; until then each + build keeps the version and takes only the next build number. A patch of 0 + is left off (1.5, not 1.5.0); any other patch stays (1.4.1). - Google Play goes through the runtime's `Tools/Play/play.js` (its README), run through the game's own two-line `play.js` with its `listing.json` and `play.json`: never `gplay` writes of your own, and never a copy of the diff --git a/Tools/Release/README.md b/Tools/Release/README.md index e4ecd88..b5ed666 100644 --- a/Tools/Release/README.md +++ b/Tools/Release/README.md @@ -115,8 +115,8 @@ Tools/Release/nightly.sh --notes notes.txt # the release (the nigh 2. **Worktree.** Everything happens in a throwaway worktree of the branch, with the runtime submodule, removed at the end; the checkout it's run from is only fetched. -3. **Version.** The minor goes up, with no patch (1.7 → 1.8, 1.4.1 → 1.5), - once the version has an approved release on either store: an App Store version +3. **Version.** The minor goes up (1.7 → 1.8, 1.4.1 → 1.5, a patch of 0 + left off) once the version has an approved release on either store: an App Store version Apple approved (waiting for release, live, or later replaced or removed), or a production release on Play that names the version and that Google approved (`play.js versions --approved`). Then the next build number. Both diff --git a/Tools/Release/lib.js b/Tools/Release/lib.js index fb080a8..d092964 100644 --- a/Tools/Release/lib.js +++ b/Tools/Release/lib.js @@ -44,14 +44,20 @@ function withVersion(text, from, to) { (value.replace(/"/g, '').trim() === from ? `MARKETING_VERSION = ${to};` : line)); } -// The next minor version, with no patch: 1.7 → 1.8, 1.4.1 → 1.5. +// The next minor version, written without a patch of 0: 1.7 → 1.8, +// 1.4.1 → 1.5 (1.5.0 with its patch of 0 left off). function bumpMinor(version) { const parts = String(version).split('.'); const [major, minor] = parts.map(Number); if (parts.length < 2 || parts.length > 3 || !Number.isInteger(major) || !Number.isInteger(minor)) { throw new Error(`MARKETING_VERSION isn't x.y or x.y.z: ${version}`); } - return `${major}.${minor + 1}`; + return withoutZeroPatch(`${major}.${minor + 1}.0`); +} + +// A version without a patch of 0 (1.5.0 is 1.5); any other patch stays (1.4.1). +function withoutZeroPatch(version) { + return String(version).replace(/^(\d+\.\d+)\.0$/, '$1'); } // --- Build numbers -------------------------------------------------------- @@ -217,7 +223,7 @@ function playRelease({ aab, name, notes, send }) { } module.exports = { - APP_STORE_APPROVED, PLATFORMS, projectSetting, withBuild, withVersion, bumpMinor, + APP_STORE_APPROVED, PLATFORMS, projectSetting, withBuild, withVersion, bumpMinor, withoutZeroPatch, highestTaken, nextBuild, thisBuild, androidName, patchName, ascData, ascBuildNumbers, ascUploadNumbers, appStoreApproved, newPRs, buildInSubject, buildSubject, bulleted, plainTitle, draftNotes, FALLBACK, fill, settingsFrom, nightlyProblems, playRelease, sameVersion, namesVersion, diff --git a/Tools/Release/release.test.js b/Tools/Release/release.test.js index 5aed671..6fddf68 100644 --- a/Tools/Release/release.test.js +++ b/Tools/Release/release.test.js @@ -30,6 +30,10 @@ test('the minor goes up with as many parts as the version has', () => { assert.strictEqual(lib.bumpMinor('1.5.0'), '1.6'); assert.strictEqual(lib.bumpMinor('2.9'), '2.10'); assert.throws(() => lib.bumpMinor('7'), /x\.y/); + assert.strictEqual(lib.withoutZeroPatch('1.5.0'), '1.5'); + assert.strictEqual(lib.withoutZeroPatch('1.4.1'), '1.4.1'); + assert.strictEqual(lib.withoutZeroPatch('1.10.0'), '1.10'); + assert.strictEqual(lib.withoutZeroPatch('2.0'), '2.0'); }); test('build numbers: one past everything taken; a build now keeps an untaken project number', () => { From fd7b557cf0539506646ddac602e26fee207a2bb2 Mon Sep 17 00:00:00 2001 From: Himanshu Kapoor Date: Sun, 22 Nov 2026 23:12:31 +0100 Subject: [PATCH 3/3] Release tests: the bump's test says the rule it checks Co-Authored-By: Claude --- Tools/Release/release.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/Release/release.test.js b/Tools/Release/release.test.js index 6fddf68..21abd28 100644 --- a/Tools/Release/release.test.js +++ b/Tools/Release/release.test.js @@ -24,7 +24,7 @@ test('the project: the app target is the last value; a bump leaves other targets assert.match(bumped, /MARKETING_VERSION = 1\.0;/); }); -test('the minor goes up with as many parts as the version has', () => { +test('the minor goes up to x.(y+1).0, written without its patch of 0', () => { assert.strictEqual(lib.bumpMinor('1.7'), '1.8'); assert.strictEqual(lib.bumpMinor('1.4.1'), '1.5'); assert.strictEqual(lib.bumpMinor('1.5.0'), '1.6');