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:
parent
40d14c0756
commit
0e051644a9
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue