Fix version parsing in SQL
I have no idea why this logic was only looking at snapshot JARs (what is suppose to happen in production?). This breaks the release tests though which we really need to have stable. This commit fixes this by also considering non-snapshot JARs. Original commit: elastic/x-pack-elasticsearch@47020ed3aa
This commit is contained in:
parent
ffeebc366d
commit
6ceee0be8f
|
@ -76,7 +76,7 @@ public abstract class Version {
|
|||
String ver = "Unknown";
|
||||
String hash = ver;
|
||||
|
||||
if (urlStr.startsWith("file:/") && urlStr.endsWith("-SNAPSHOT.jar")) {
|
||||
if (urlStr.startsWith("file:/") && urlStr.endsWith(".jar")) {
|
||||
try (JarInputStream jar = new JarInputStream(url.openStream())) {
|
||||
Manifest manifest = jar.getManifest();
|
||||
hash = manifest.getMainAttributes().getValue("Change");
|
||||
|
|
Loading…
Reference in New Issue