From e6bde5599d8a0b7d01915a257ce6f0b953f95667 Mon Sep 17 00:00:00 2001 From: Vincent Koc <25068+vincentkoc@users.noreply.github.com> Date: Fri, 10 Jul 2026 17:27:45 -0700 Subject: [PATCH] fix(release): keep correction tags at base version --- scripts/release-version.ts | 6 +++++- test/scripts/release-version.test.ts | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/scripts/release-version.ts b/scripts/release-version.ts index b262bb562007..8eea9213699c 100644 --- a/scripts/release-version.ts +++ b/scripts/release-version.ts @@ -104,8 +104,12 @@ export function planReleaseVersion(params: { ); } + const packageVersion = + parsedVersion.correctionNumber === undefined + ? parsedVersion.version + : parsedVersion.baseVersion; const changes = [ - planPackageJson(rootDir, parsedVersion.version), + planPackageJson(rootDir, packageVersion), planMacosInfoPlist(rootDir, parsedVersion), ]; if (params.android) { diff --git a/test/scripts/release-version.test.ts b/test/scripts/release-version.test.ts index cd268853293d..34a53244a704 100644 --- a/test/scripts/release-version.test.ts +++ b/test/scripts/release-version.test.ts @@ -144,6 +144,26 @@ describe("release version planning", () => { }); }); + it("keeps repository versions at the base version for correction tags", () => { + const root = writeFixture(); + const plan = planReleaseVersion({ + rootDir: root, + version: "2026.7.2-3", + }); + applyReleaseVersionPlan(plan); + + expect(plan.version).toBe("2026.7.2-3"); + expect(readJson(path.join(root, "package.json"))).toMatchObject({ + version: "2026.7.2", + }); + expect( + fs.readFileSync( + path.join(root, "apps", "macos", "Sources", "OpenClaw", "Resources", "Info.plist"), + "utf8", + ), + ).toContain("2026.7.2"); + }); + it("keeps an existing Android build increment on the same release train", () => { const root = writeFixture(); const plan = planReleaseVersion({