Skip to content

Commit

Permalink
fix #2877
Browse files Browse the repository at this point in the history
  • Loading branch information
mlehmannm committed Oct 2, 2023
1 parent 244bd31 commit 8668914
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public void buildEnded(MavenSession session) {
String newVersion = suggestedVersion.map(String::valueOf)
.orElseGet(() -> Versions.incrementVersion(currentVersion,
VersionBumpMojo.getIncrement(session, project, projectHelper)));
boolean isSnapshot = currentVersion.endsWith(Versions.SUFFIX_SNAPSHOT);
if (isSnapshot) {
newVersion += Versions.SUFFIX_SNAPSHOT;
}
logger.info(project.getId() + " requires a version bump from " + currentVersion + " => "
+ newVersion);
engine.setProjects(metadataReader.getProjects());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import org.osgi.framework.Version;

public class Versions {
private static final String SUFFIX_QUALIFIER = ".qualifier";
public static final String SUFFIX_QUALIFIER = ".qualifier";

private static final String SUFFIX_SNAPSHOT = "-SNAPSHOT";
public static final String SUFFIX_SNAPSHOT = "-SNAPSHOT";

public static String toCanonicalVersion(String version) {
if (version == null) {
Expand Down

0 comments on commit 8668914

Please sign in to comment.