Relax regex for getting C++ build so it works for developers with uncommitted changes

Original commit: elastic/x-pack-elasticsearch@a6faea0cc6
This commit is contained in:
David Roberts 2017-02-20 11:25:19 +00:00
parent b84e926431
commit 782f97a60f
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ public class NativeController {
public Map<String, Object> getNativeCodeInfo() throws TimeoutException { public Map<String, Object> getNativeCodeInfo() throws TimeoutException {
String copyrightMessage = cppLogHandler.getCppCopyright(CONTROLLER_CONNECT_TIMEOUT); String copyrightMessage = cppLogHandler.getCppCopyright(CONTROLLER_CONNECT_TIMEOUT);
Matcher matcher = Pattern.compile("Version (.+) \\(Build ([0-9a-f]+)\\) Copyright ").matcher(copyrightMessage); Matcher matcher = Pattern.compile("Version (.+) \\(Build ([^)]+)\\) Copyright ").matcher(copyrightMessage);
if (matcher.find()) { if (matcher.find()) {
Map<String, Object> info = new HashMap<>(2); Map<String, Object> info = new HashMap<>(2);
info.put("version", matcher.group(1)); info.put("version", matcher.group(1));