diff --git a/tasks/build/archives.js b/tasks/build/archives.js index 2639ab86e28fc..ef50854e0d626 100644 --- a/tasks/build/archives.js +++ b/tasks/build/archives.js @@ -1,6 +1,6 @@ module.exports = function createPackages(grunt) { let { config } = grunt; - let { resolve } = require('path'); + let { resolve, relative } = require('path'); let { execFile } = require('child_process'); let { all, fromNode } = require('bluebird'); @@ -13,13 +13,13 @@ module.exports = function createPackages(grunt) { let archives = async (platform) => { // kibana.tar.gz - await exec('tar', ['-zchf', platform.tarPath, platform.buildName]); + await exec('tar', ['-zchf', relative(buildPath, platform.tarPath), platform.buildName]); // kibana.zip if (/windows/.test(platform.name)) { - await exec('zip', ['-rq', '-ll', platform.zipPath, platform.buildName]); + await exec('zip', ['-rq', '-ll', relative(buildPath, platform.zipPath), platform.buildName]); } else { - await exec('zip', ['-rq', platform.zipPath, platform.buildName]); + await exec('zip', ['-rq', relative(buildPath, platform.zipPath), platform.buildName]); } }; diff --git a/tasks/build/shasums.js b/tasks/build/shasums.js index c5dcedeba8f29..b24ccfefecc7a 100644 --- a/tasks/build/shasums.js +++ b/tasks/build/shasums.js @@ -1,6 +1,9 @@ var { promisify } = require('bluebird'); var readdir = promisify(require('fs').readdir); var exec = promisify(require('child_process').exec); +var platform = require('os').platform(); +var cmd = /^win/.test(platform) ? 'sha1sum ' : 'shasum '; + module.exports = function (grunt) { grunt.registerTask('_build:shasums', function () { @@ -11,7 +14,7 @@ module.exports = function (grunt) { // only sha the archives if (!archive.match(/\.zip$|\.tar.gz$/)) return; - return exec('shasum ' + archive + ' > ' + archive + '.sha1.txt', { + return exec(cmd + archive + ' > ' + archive + '.sha1.txt', { cwd: targetDir }); }) diff --git a/tasks/config/run.js b/tasks/config/run.js index 0d0be286c465c..fa61f23fdd88c 100644 --- a/tasks/config/run.js +++ b/tasks/config/run.js @@ -4,6 +4,7 @@ module.exports = function (grunt) { let {resolve} = require('path'); let root = p => resolve(__dirname, '../../', p); let binScript = /^win/.test(platform) ? '.\\bin\\kibana.bat' : './bin/kibana'; + let buildScript = /^win/.test(platform) ? '.\\build\\kibana\\bin\\kibana.bat' : './build/kibana/bin/kibana'; let uiConfig = require(root('test/serverConfig')); const stdDevArgs = [ @@ -150,7 +151,7 @@ module.exports = function (grunt) { ready: /Optimization .+ complete/, quiet: true }, - cmd: './build/kibana/bin/kibana', + cmd: buildScript, args: [ '--env.name=production', '--logging.json=false',