8173894: jib reports version "" in jdk10

Update getVersion function, missing \ in regexp when stripping trailing zeros.

Reviewed-by: erikj
This commit is contained in:
Stefan Sarne 2017-02-03 16:03:17 +01:00 committed by Stefan Särne
parent 23b743a2b7
commit 9c9b1e0510

View File

@ -1067,7 +1067,7 @@ var getVersion = function (major, minor, security, patch) {
+ "." + (minor != null ? minor : version_numbers.get("DEFAULT_VERSION_MINOR"))
+ "." + (security != null ? security : version_numbers.get("DEFAULT_VERSION_SECURITY"))
+ "." + (patch != null ? patch : version_numbers.get("DEFAULT_VERSION_PATCH"));
while (version.match(".*\.0$")) {
while (version.match(".*\\.0$")) {
version = version.substring(0, version.length - 2);
}
return version;