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:
commit
69b29f8d4f
|
@ -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',
|
||||
|
|
19
tasks/replace_package_json.js
Normal file
19
tasks/replace_package_json.js
Normal 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, ' '));
|
||||
});
|
||||
};
|
Loading…
Reference in a new issue