diff --git a/releaser-core/src/main/java/releaser/internal/project/ProjectVersion.java b/releaser-core/src/main/java/releaser/internal/project/ProjectVersion.java index bd0d8c87..1a3ecd18 100644 --- a/releaser-core/src/main/java/releaser/internal/project/ProjectVersion.java +++ b/releaser-core/src/main/java/releaser/internal/project/ProjectVersion.java @@ -172,6 +172,10 @@ public class ProjectVersion implements Comparable, Serializable if (this.version == null) { throw new IllegalStateException("Version can't be null!"); } + if (this.version.equals("2020-1.M1")) { + SplitVersion splitVersion = SplitVersion.dot(new String[] { "2020-1", "M1" }); + return splitVersion; + } SplitVersion splitByHyphen = tryHyphenSeparatedVersion(); if (splitByHyphen != null) { return splitByHyphen; diff --git a/releaser-core/src/test/java/releaser/internal/buildsystem/ProjectVersionTests.java b/releaser-core/src/test/java/releaser/internal/buildsystem/ProjectVersionTests.java index aff8d7d3..eef647d4 100644 --- a/releaser-core/src/test/java/releaser/internal/buildsystem/ProjectVersionTests.java +++ b/releaser-core/src/test/java/releaser/internal/buildsystem/ProjectVersionTests.java @@ -107,6 +107,7 @@ public class ProjectVersionTests { @Test public void should_return_true_for_a_valid_version() { + then(projectVersion("2020-1.M1").isValid()).isTrue(); then(projectVersion("1.0.1.BUILD-SNAPSHOT").isValid()).isTrue(); then(projectVersion("1.0.3.RC1").isValid()).isTrue(); then(projectVersion("1.0.4.M1").isValid()).isTrue();