Skip to content

Commit

Permalink
Retain .qualifier/-SNAPSHOT on version bump
Browse files Browse the repository at this point in the history
fix #2877
  • Loading branch information
mlehmannm committed Oct 2, 2023
1 parent fc8c8df commit 4b79f17
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.TychoConstants;
import org.eclipse.tycho.build.BuildListener;
import org.eclipse.tycho.core.exceptions.VersionBumpRequiredException;
import org.eclipse.tycho.helper.ProjectHelper;
Expand Down Expand Up @@ -78,9 +79,9 @@ 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);
boolean isSnapshot = currentVersion.endsWith(TychoConstants.SUFFIX_SNAPSHOT);
if (isSnapshot) {
newVersion += Versions.SUFFIX_SNAPSHOT;
newVersion += TychoConstants.SUFFIX_SNAPSHOT;
}
logger.info(project.getId() + " requires a version bump from " + currentVersion + " => "
+ newVersion);
Expand Down

0 comments on commit 4b79f17

Please sign in to comment.