Fix copy/paste from main

Issue gh-13500
This commit is contained in:
Steve Riesenberg 2023-07-12 15:59:51 -05:00
parent 991b398c55
commit e7201c48d1
No known key found for this signature in database
GPG Key ID: 5F311AB48A55D521
1 changed files with 3 additions and 3 deletions

View File

@ -52,9 +52,9 @@ public class SaganCreateReleaseTask extends DefaultTask {
if (this.version.endsWith("-SNAPSHOT")) {
Matcher versionMatcher = VERSION_PATTERN.matcher(this.version);
Assert.isTrue(versionMatcher.matches(), "Version " + this.version + " does not match expected pattern");
var majorVersion = versionMatcher.group(1);
var minorVersion = versionMatcher.group(2);
var majorMinorVersion = "%s.%s-SNAPSHOT".formatted(majorVersion, minorVersion);
String majorVersion = versionMatcher.group(1);
String minorVersion = versionMatcher.group(2);
String majorMinorVersion = String.format("%s.%s-SNAPSHOT", majorVersion, minorVersion);
referenceDocUrl = this.referenceDocUrl.replace("{version}", majorMinorVersion);
}