for (PackageAndLatestVersionComposite plv : config.allPackages) {
if (plv.getGeneralPackage().getName().equals(fileName)) {
try {
String version = plv.getLatestPackageVersion().getVersion();
PackageVersionFormatDescription format = cliScriptPackageType.getVersionFormat();
if (format == null) {
return;
}
if (format.getOsgiVersionExtractionRegex() == null) {
return;
}
String regex = format.getOsgiVersionExtractionRegex();
int group = format.getOsgiVersionGroupIndex();
String oldOsgiVersion = getOsgiVersion(version, regex, group);
OSGiVersion v = new OSGiVersion(oldOsgiVersion);
if (v.getMicroIfDefined() != null) {
v.setMicro(v.getMicro() + 1);