Build: Remove public license key and inject it during release builds (elastic/x-pack-elasticsearch#3916)

This commit moves the dev key into core and renames to make it clear it
is for snapshots, and makes the production key a required parameter of
release builds.

Original commit: elastic/x-pack-elasticsearch@ea299bd5a2
This commit is contained in:
Ryan Ernst 2018-03-20 22:06:05 -07:00 committed by GitHub
parent 57946a97df
commit e7e7e53fad
3 changed files with 9 additions and 6 deletions

View File

@ -58,10 +58,16 @@ processResources {
MavenFilteringHack.filter(it, expansions)
}
boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"))
if (snapshot) {
from '../keys/dev/public.key'
String licenseKey = System.getProperty("license.key")
if (licenseKey != null) {
println "Using provided license key from ${licenseKey}"
} else if (snapshot) {
licenseKey = 'snapshot.key'
} else {
from '../keys/prod/public.key'
throw new IllegalArgumentException('Property license.key must be set for release build')
}
from(licenseKey) {
rename { String filename -> 'public.key' }
}
}

View File

@ -1,3 +0,0 @@
ýŽÇqÝnêÄÌgŠœwM}<7D>¹‡UiKŠ•0âbÖ2ˆŒµô!Â[ÔCצ°ê4O9 š0'‰Q]b‰Éá€Ó0ëèîqI´™0H7ÔÚaTuîl0ÿˆà5¿ø&ŒÌjƒŒvÐ¥°[ä®]%Q'Ì/‰Q;Qý` Ê[È1ûïX^sA€v½îÿlñ<ÄàTÁÜ¡©ž±ùxh¢¡è÷²?1ì ÅàN3óÑ78ê'D["“Ö½¶GüY!:`j1<15>YŸ…Gõyé@&IÏü²b1Û¡r<>e‰Ø£V!¸ÿæMÍô êÇÌ{ƒ³í[ÜMs“ ½M E?e…Sø¿TË
¥i:ÄR;«R2HäYkW}šcL׆8
ÎÁfîs