Temporarily support 2020-1.M1 release train version

This commit is contained in:
Spencer Gibb
2020-04-09 20:08:32 -04:00
parent 6d0595d72a
commit 2634db5b3d
2 changed files with 5 additions and 0 deletions

View File

@@ -172,6 +172,10 @@ public class ProjectVersion implements Comparable<ProjectVersion>, 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;

View File

@@ -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();