Build: Use licensing prod key when building release
This change switches the build to use the licensing prod key when building the xpack jar for release. Original commit: elastic/x-pack-elasticsearch@54a21dae5b
This commit is contained in:
parent
2dde85ab33
commit
39160b5b22
|
@ -99,12 +99,12 @@ processResources {
|
||||||
inputs.properties(expansions)
|
inputs.properties(expansions)
|
||||||
MavenFilteringHack.filter(it, expansions)
|
MavenFilteringHack.filter(it, expansions)
|
||||||
}
|
}
|
||||||
String licenseKeyName = System.getProperty('license.key', 'dev')
|
boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"))
|
||||||
String licenseKeyPath = "license-plugin/keys/${licenseKeyName}/public.key"
|
if (snapshot) {
|
||||||
if (file(licenseKeyPath).exists() == false) {
|
from 'license-plugin/keys/dev/public.key'
|
||||||
throw new GradleException("no public key found for '${licenseKeyName}'")
|
} else {
|
||||||
|
from 'license-plugin/keys/prod/public.key'
|
||||||
}
|
}
|
||||||
from licenseKeyPath
|
|
||||||
}
|
}
|
||||||
|
|
||||||
forbiddenPatterns {
|
forbiddenPatterns {
|
||||||
|
|
Loading…
Reference in New Issue