Merge pull request #4062 from spalger/fix/buildScript

[build] improve the package.json file that's included in the dist
This commit is contained in:
Spencer 2015-06-02 19:56:39 -07:00
commit 69b29f8d4f
2 changed files with 20 additions and 0 deletions

View file

@ -12,6 +12,7 @@ module.exports = function (grunt) {
'requirejs',
'clean:unneeded_source_in_build',
'copy:server_src',
'replace_package_json',
'replace:dist',
'copy:dist',
'compile_dist_readme',

View file

@ -0,0 +1,19 @@
module.exports = function (grunt) {
grunt.registerTask('replace_package_json', function () {
var path = grunt.config.process('<%= build %>/kibana/package.json');
var pkg = grunt.config.get('pkg');
grunt.file.write(path, JSON.stringify({
name: pkg.name,
description: pkg.description,
keywords: pkg.keywords,
version: pkg.version,
build: {
number: grunt.config.get('buildNum'),
sha: grunt.config.get('commitSha')
},
repository: pkg.repository,
dependencies: pkg.dependencies
}, null, ' '));
});
};