[kbn-es] Platform specific snapshots (#29673)

This commit is contained in:
Jonathan Budzenski 2019-02-01 22:59:59 -06:00 committed by Tyler Smalley
parent b44d1ad54a
commit 61f999304b
2 changed files with 18 additions and 3 deletions

View file

@ -145,10 +145,24 @@ function downloadFile(url, dest, log) {
}
function getFilename(license, version) {
const extension = os.platform().startsWith('win') ? 'zip' : 'tar.gz';
const basename = `elasticsearch${license === 'oss' ? '-oss-' : '-'}${version}`;
const platform = os.platform();
let suffix = null;
switch (platform) {
case 'darwin':
suffix = 'darwin-x86_64.tar.gz';
break;
case 'linux':
suffix = 'linux-x86_64.tar.gz';
break;
case 'win32':
suffix = 'windows-x86_64.zip';
break;
default:
throw new Error(`Unsupported platform ${platform}`);
}
return `${basename}-SNAPSHOT.${extension}`;
const basename = `elasticsearch${license === 'oss' ? '-oss-' : '-'}${version}`;
return `${basename}-SNAPSHOT-${suffix}`;
}
function getUrl(fileName) {

View file

@ -155,6 +155,7 @@ export default function ({ getService }) {
"stack_stats.kibana.timelion_sheet",
"stack_stats.kibana.versions",
"stack_stats.kibana.visualization",
"stack_stats.xpack.ccr",
"stack_stats.xpack.graph",
"stack_stats.xpack.ilm",
"stack_stats.xpack.logstash",