org.octopusden.buildsystem.its.version.DefaultBuildVersionPatternCalculator Maven / Gradle / Ivy
The newest version!
package org.octopusden.buildsystem.its.version;
class DefaultBuildVersionPatternCalculator {
String calculate(String fullMajorFormat) {
return fullMajorFormat
.replaceAll("\\$major02", "(?\\\\d+)")
.replaceAll("\\$major", "(?\\\\d+)")
.replaceAll("\\$minor02", "(?\\\\d+)")
.replaceAll("\\$minorCards", "(?\\\\d+)")
.replaceAll("\\$minor", "(?\\\\d+)")
.replaceAll("\\$service02", "(?\\\\d+)")
.replaceAll("\\$serviceCards", "(?\\\\d+)")
.replaceAll("\\$service", "(?\\\\d+)")
.replaceAll("\\$fix02", "(?\\\\d+)")
.replaceAll("\\$fix04", "(?\\\\d+)")
.replaceAll("\\$fix", "(?\\\\d+)")
.replaceAll("\\$build02", "(?\\\\d+)")
.replaceAll("\\$build04", "(?\\\\d+)")
.replaceAll("\\$build", "(?\\\\d+)")
.replaceAll("\\.", "\\\\.");
}
}