From 4f1f723dba80c921e6c1798cae63dc27b5b98fb6 Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Mon, 14 Oct 2024 12:43:41 -0700 Subject: [PATCH] Default to incrementing the minor version when computing the dev version Most projects use semver, so assume the next dev version is X.Y+1.0 and not X+1.0.0 --- metapkg/packages/base.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/metapkg/packages/base.py b/metapkg/packages/base.py index 383d0d7..d78631d 100644 --- a/metapkg/packages/base.py +++ b/metapkg/packages/base.py @@ -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, @@ -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(