diff --git a/tasks/build/build.js b/tasks/build/build.js index 397901f54ce39..6baadf55a5fed 100644 --- a/tasks/build/build.js +++ b/tasks/build/build.js @@ -2,28 +2,28 @@ module.exports = function (grunt) { let { flatten } = require('lodash'); grunt.registerTask('build', flatten([ - 'build-getProps', + 'build:getProps', 'clean:build', 'clean:target', - 'downloadNodes:start', + 'build:downloadNodes:start', 'copy:devSource', 'babel:build', - 'build-cliIndex', - 'build-installedPlugins', - 'build-packageJson', - 'build-readme', - 'build-installNpmDeps', + 'build:cliIndex', + 'build:installedPlugins', + 'build:packageJson', + 'build:readme', + 'build:installNpmDeps', 'run:optimizeBuild', 'stop:optimizeBuild', - 'downloadNodes:finish', + 'build:downloadNodes:finish', 'clean:testsFromModules', - 'build-versionedLinks', - 'build-archives', + 'build:versionedLinks', + 'build:archives', !grunt.option('os-packages') ? [] : [ - 'build-pleaseRun', - 'build-pleaseManageUser', - 'build-osPackages', + 'build:pleaseRun', + 'build:pleaseManageUser', + 'build:osPackages', ], - 'build-shasums' + 'build:shasums' ])); }; diff --git a/tasks/build/cliIndex.js b/tasks/build/cliIndex.js index 308cc82cae80c..30299372c087e 100644 --- a/tasks/build/cliIndex.js +++ b/tasks/build/cliIndex.js @@ -3,7 +3,7 @@ module.exports = function (grunt) { var file = 'build/kibana/src/cli/index.js'; var blurb = `require('babel/register')(require('../optimize/babelOptions'));\n`; - grunt.registerTask('build-cliIndex', function () { + grunt.registerTask('build:cliIndex', function () { var before = grunt.file.read(file); var after = before.replace(blurb, ''); diff --git a/tasks/build/downloadNodes.js b/tasks/build/downloadNodes.js index a437d7bf23dc6..6de387ff122e4 100644 --- a/tasks/build/downloadNodes.js +++ b/tasks/build/downloadNodes.js @@ -76,8 +76,8 @@ module.exports = function (grunt) { let current = null; let start = () => current || (current = run()); - grunt.registerTask('downloadNodes:start', start); - grunt.registerTask('downloadNodes:finish', function () { + grunt.registerTask('build:downloadNodes:start', start); + grunt.registerTask('build:downloadNodes:finish', function () { start().then(() => { grunt.log.ok(`node binaries for ${platforms.join(', ')} downloaded`); }) diff --git a/tasks/build/getProps.js b/tasks/build/getProps.js index 2d031eec93d84..17fcc3b0f56e9 100644 --- a/tasks/build/getProps.js +++ b/tasks/build/getProps.js @@ -1,6 +1,6 @@ module.exports = function (grunt) { var exec = require('child_process').execSync; - grunt.registerTask('build-getProps', function () { + grunt.registerTask('build:getProps', function () { grunt.config.set('buildSha', String(exec('git rev-parse HEAD')).trim()); grunt.config.set('buildNum', parseFloat(String(exec('git log --format="%h" | wc -l')).trim())); }); diff --git a/tasks/build/installNpmDeps.js b/tasks/build/installNpmDeps.js index 91c1acab6d68e..c8390e29b412e 100644 --- a/tasks/build/installNpmDeps.js +++ b/tasks/build/installNpmDeps.js @@ -2,7 +2,7 @@ module.exports = function (grunt) { var { execSync } = require('child_process'); var { resolve } = require('path'); - grunt.registerTask('build-installNpmDeps', function () { + grunt.registerTask('build:installNpmDeps', function () { grunt.file.mkdir('build/kibana/node_modules'); execSync('npm install --production --no-optional', { diff --git a/tasks/build/installedPlugins.js b/tasks/build/installedPlugins.js index d66f0b8c5610c..342571b1f4904 100644 --- a/tasks/build/installedPlugins.js +++ b/tasks/build/installedPlugins.js @@ -1,5 +1,5 @@ module.exports = function (grunt) { - grunt.registerTask('build-installedPlugins', function () { + grunt.registerTask('build:installedPlugins', function () { grunt.file.mkdir('build/kibana/installedPlugins'); }); }; diff --git a/tasks/build/linkNodes.js b/tasks/build/linkNodes.js index fcf108681b402..4a7a4e3cc32c3 100644 --- a/tasks/build/linkNodes.js +++ b/tasks/build/linkNodes.js @@ -3,7 +3,7 @@ module.exports = function (grunt) { let { basename, resolve } = require('path'); let { forOwn } = require('lodash'); - grunt.registerTask('build-versionedLinks', function () { + grunt.registerTask('build:versionedLinks', function () { let buildFiles = grunt.file.expand('build/kibana/{*,.*}'); let rootDir = grunt.config.get('root'); diff --git a/tasks/build/osPackages.js b/tasks/build/osPackages.js index 755e07765e1dc..649e0707819b9 100644 --- a/tasks/build/osPackages.js +++ b/tasks/build/osPackages.js @@ -9,7 +9,7 @@ module.exports = function (grunt) { let userScriptsDir = config.get('userScriptsDir'); let servicesByName = indexBy(config.get('services'), 'id'); - grunt.registerTask('build-osPackages', function () { + grunt.registerTask('build:osPackages', function () { grunt.config.get('platforms').forEach(({ name, buildDir }) => { let arch = /x64$/.test(name) ? 'x86_64' : 'i686'; diff --git a/tasks/build/packageJson.js b/tasks/build/packageJson.js index 32da2284b5d32..e368cd3369e46 100644 --- a/tasks/build/packageJson.js +++ b/tasks/build/packageJson.js @@ -1,5 +1,5 @@ module.exports = function (grunt) { - grunt.registerTask('build-packageJson', function () { + grunt.registerTask('build:packageJson', function () { var pkg = grunt.config.get('pkg'); grunt.file.write( diff --git a/tasks/build/packages.js b/tasks/build/packages.js index 537a2f9ec455f..b751a4cb9037a 100644 --- a/tasks/build/packages.js +++ b/tasks/build/packages.js @@ -26,7 +26,7 @@ module.exports = function createPackages(grunt) { } }; - grunt.registerTask('build-archives', function () { + grunt.registerTask('build:archives', function () { all( grunt.config.get('platforms') diff --git a/tasks/build/pleaseManageUser.js b/tasks/build/pleaseManageUser.js index 30e007285f37b..c61663ed166ac 100644 --- a/tasks/build/pleaseManageUser.js +++ b/tasks/build/pleaseManageUser.js @@ -3,7 +3,7 @@ module.exports = function (grunt) { let { resolve } = require('path'); let userScriptsDir = grunt.config.get('userScriptsDir'); - grunt.registerTask('build-pleaseManageUser', function () { + grunt.registerTask('build:pleaseManageUser', function () { grunt.file.mkdir(userScriptsDir); execFileSync('please-manage-user', ['--output', userScriptsDir, 'kibana']); }); diff --git a/tasks/build/pleaserun.js b/tasks/build/pleaserun.js index a3620ef1655e3..26a3ecb30cce1 100644 --- a/tasks/build/pleaserun.js +++ b/tasks/build/pleaserun.js @@ -2,7 +2,7 @@ var { resolve } = require('path'); var { execFileSync } = require('child_process'); module.exports = function createServices(grunt) { - grunt.registerTask('build-pleaserun', function () { + grunt.registerTask('build:pleaserun', function () { // TODO(sissel): Detect if 'pleaserun' is found, and provide a useful error // to the user if it is missing. diff --git a/tasks/build/readme.js b/tasks/build/readme.js index d6884aaf54c3d..540ba98fbcce1 100644 --- a/tasks/build/readme.js +++ b/tasks/build/readme.js @@ -13,7 +13,7 @@ TextRenderer.prototype.heading = function (text, level, raw) { module.exports = function (grunt) { - grunt.registerTask('build-readme', function () { + grunt.registerTask('build:readme', function () { let transform = function (input) { let output = input.replace(/<\!\-\- [^\-]+ \-\->/g, '\n'); output = marked(output); diff --git a/tasks/build/shasums.js b/tasks/build/shasums.js index e4d9c9fb15e4f..ace8eb0ce9633 100644 --- a/tasks/build/shasums.js +++ b/tasks/build/shasums.js @@ -3,7 +3,7 @@ var readdir = promisify(require('fs').readdir); var exec = promisify(require('child_process').exec); module.exports = function (grunt) { - grunt.registerTask('build-shasums', function () { + grunt.registerTask('build:shasums', function () { var targetDir = grunt.config.get('target'); readdir(targetDir)