Skip to content

Commit

Permalink
Default to incrementing the minor version when computing the dev version
Browse files Browse the repository at this point in the history
Most projects use semver, so assume the next dev version is X.Y+1.0 and
not X+1.0.0
  • Loading branch information
elprans committed Oct 14, 2024
1 parent c9b0e97 commit 4f1f723
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion metapkg/packages/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,13 @@ def resolve_vcs_version(

return rev

@classmethod
def get_next_feature_version(
cls,
version: poetry_version.Version,
) -> poetry_version.Version:
return version.next_minor()

@classmethod
def version_from_vcs_version(
cls,
Expand All @@ -658,7 +665,9 @@ def version_from_vcs_version(
and parts[1].isascii()
):
# Have commits after the tag
parsed_ver = cls.parse_vcs_version(parts[0]).next_major()
parsed_ver = cls.get_next_feature_version(
cls.parse_vcs_version(parts[0]),
)

if not is_release:
commits = repo.run(
Expand Down

0 comments on commit 4f1f723

Please sign in to comment.