kibana/tasks/run_build.js
Chris Cowan 33559850c1 Fixing Binaries for Deployment
- Fixed the way the config parses the plugins
- Fixed scripts to load config from the right place in production
2015-01-19 14:29:05 -07:00

31 lines
732 B
JavaScript

var os = require('os');
module.exports = function (grunt) {
grunt.registerTask('run_build', [
'build',
'_extract_built',
'run:built_kibana',
'_open_built_kibana',
'wait:built_kibana'
]);
var arch = os.arch();
var platform = os.platform();
var join = require('path').join;
var extract = require('./utils/spawn')(
'tar',
[
'-xzf',
grunt.config.process('<%= pkg.name %>-<%= pkg.version %>-' + platform + '-' + arch + '.tar.gz')
],
join(__dirname, '../target')
);
grunt.registerTask('_extract_built', function () {
extract().nodeify(this.async());
});
grunt.registerTask('_open_built_kibana', function () {
require('opn')('http://localhost:5601');
});
};