diff --git a/src/main/python/ddadevops/domain/version.py b/src/main/python/ddadevops/domain/version.py index 41f0dc1..4083839 100644 --- a/src/main/python/ddadevops/domain/version.py +++ b/src/main/python/ddadevops/domain/version.py @@ -56,8 +56,7 @@ class Version(Validateable): if self.is_snapshot(): return Version(new_version_list, snapshot_suffix=self.snapshot_suffix, version_str=None) else: - new_version_list[2] = 0 - new_version_list[1] += 1 + new_version_list[2] += 1 return Version(new_version_list, snapshot_suffix=snapshot_suffix, version_str=None) def create_patch(self): diff --git a/src/test/python/domain/test_version.py b/src/test/python/domain/test_version.py index 6289d30..850fd7a 100644 --- a/src/test/python/domain/test_version.py +++ b/src/test/python/domain/test_version.py @@ -99,16 +99,14 @@ def test_should_create_major(): assert sut.to_string() == "2.0.0" def test_should_create_bump(): - # TODO: bom - 2023_05_11: Why does this not actually bump the version? version = Version.from_str("1.2.3-SNAPSHOT") sut = version.create_bump() assert sut.to_string() == "1.2.3-SNAPSHOT" - # TODO: bom - 2023_05_11: Why do we bump the minor version and not the patch? version = Version.from_str("1.2.3") sut = version.create_bump("SNAPSHOT") - assert sut.to_string() == "1.3.0-SNAPSHOT" + assert sut.to_string() == "1.2.4-SNAPSHOT" version = Version.from_str("1.0.0") sut = version.create_bump("SNAPSHOT") - assert sut.to_string() == "1.1.0-SNAPSHOT" \ No newline at end of file + assert sut.to_string() == "1.0.1-SNAPSHOT" \ No newline at end of file