Considering SR* as release

fixes #21
This commit is contained in:
Marcin Grzejszczak
2017-04-19 12:22:17 +02:00
parent 949cc081af
commit 96c362646b
2 changed files with 8 additions and 1 deletions

View File

@@ -50,7 +50,7 @@ public class ProjectVersion {
}
public boolean isRelease() {
return this.version.contains("RELEASE");
return this.version.contains("RELEASE") || this.version.matches(".*.SR[0-9]+");
}
@Override public String toString() {

View File

@@ -110,6 +110,13 @@ public class ProjectVersionTests {
then(projectVersion(version).isRelease()).isTrue();
}
@Test
public void should_return_true_for_service_release_versions() {
String version = "1.0.1.SR1";
then(projectVersion(version).isRelease()).isTrue();
}
private ProjectVersion projectVersion(String version) {
return new ProjectVersion("foo", version);
}