From 0e051644a922d7cd43c70f9b80dfa79d92cbfad4 Mon Sep 17 00:00:00 2001 From: Dylan Hurd Date: Fri, 21 Nov 2025 10:17:12 -0800 Subject: [PATCH] fix(scripts) next_minor_version should reset patch number (#7050) ## Summary When incrementing the minor version, we should reset patch to 0, rather than keeping it. ## Testing - [x] tested locally with dry_run and `get_latest_release_version` mocked out --------- Co-authored-by: Michael Bolin --- codex-rs/scripts/create_github_release | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/codex-rs/scripts/create_github_release b/codex-rs/scripts/create_github_release index 47d6d3ce8..e7b8972db 100755 --- a/codex-rs/scripts/create_github_release +++ b/codex-rs/scripts/create_github_release @@ -298,8 +298,12 @@ def create_tag_ref(version: str, tag_sha: str) -> None: def determine_version(args: argparse.Namespace) -> str: latest_version = get_latest_release_version() - major, minor, patch = parse_semver(latest_version) - next_minor_version = format_version(major, minor + 1, patch) + # When determining the next version after the current release, + # we should always increment the minor version, but reset the + # patch to zero. In practice, `patch` should only be non-zero if + # --emergency-version-override was used. + major, minor, _patch = parse_semver(latest_version) + next_minor_version = format_version(major, minor + 1, 0) if args.publish_release: return next_minor_version