#66 - Polishing.

Introduced Iteration.isPreview() to allow finding out whether the current iteration produces either a milestone or release candidate.
This commit is contained in:
Oliver Gierke
2017-11-27 15:30:50 +01:00
parent 93136b8e63
commit 4fe9fb7bf0
2 changed files with 11 additions and 2 deletions

View File

@@ -309,8 +309,8 @@ class MavenBuildSystem implements BuildSystem {
Assert.notNull(module, "Module iteration must not be null!");
Assert.notNull(information, "Deployment information must not be null!");
if (module.getIteration().isPublic()) {
logger.log(module, "Not a public version, skipping Artifactory deployment.");
if (!module.getIteration().isPreview()) {
logger.log(module, "Not a preview version (milestone or release candidate). Skipping Artifactory deployment.");
return;
}

View File

@@ -72,6 +72,15 @@ public class Iteration {
return isServiceIteration() || this.equals(GA);
}
/**
* Returns whether the current Iteration is going to produce a preview release, i.e. a milestone or release candidate.
*
* @return
*/
public boolean isPreview() {
return !isPublic();
}
public boolean isServiceIteration() {
return name.startsWith("SR");
}