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 <mbolin@openai.com>
This commit is contained in:
Dylan Hurd 2025-11-21 10:17:12 -08:00 committed by GitHub
parent 40d14c0756
commit 0e051644a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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