kibana/tasks/build/package_json.js
Court Ewing 834f56392e Apply -snapshot suffix during build task
The default behavior of the build task is to now apply the -snapshot
suffix dynamically rather than us manually hardcoding and managing it
within the source code itself. The `--release` flag will drop the
-snapshot suffix on a build, which should be used for any release
candidate.

The default behavior of the build task has also changed to create
rpm/deb packages as well. Since we've only confirmed that this works on
linux, you can override that behavior by passing `skip-os-packages`.

If you do not want to create any zip or tar.gz archives, you can pass
`--skip-archives`.
2016-06-11 15:57:30 -04:00

29 lines
743 B
JavaScript

module.exports = function (grunt) {
let { defaults } = require('lodash');
let pkg = grunt.config.get('pkg');
let deepModules = grunt.config.get('deepModules');
grunt.registerTask('_build:packageJson', function () {
const { sha, number, version } = grunt.config.get('build');
grunt.file.write(
'build/kibana/package.json',
JSON.stringify({
name: pkg.name,
description: pkg.description,
keywords: pkg.keywords,
version,
build: {
number,
sha
},
repository: pkg.repository,
engines: {
node: pkg.engines.node
},
dependencies: defaults({}, pkg.dependencies, deepModules)
}, null, ' ')
);
});
};