2014-08-26 02:55:32 +02:00
|
|
|
module.exports = function (grunt) {
|
2015-01-20 01:22:13 +01:00
|
|
|
var os = require('os');
|
|
|
|
var arch = os.arch();
|
|
|
|
var platform = os.platform();
|
2014-09-04 00:15:58 +02:00
|
|
|
|
2014-09-16 20:17:57 +02:00
|
|
|
// config:
|
|
|
|
// wait: should task wait until the script exits before finishing
|
|
|
|
// ready: if not waiting, then how do we know the process is ready?
|
|
|
|
// quiet: ignore stdout from the process
|
|
|
|
// failOnError: the process is killed if output to stderr
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
wait: false,
|
|
|
|
ready: /kibana server started/i,
|
|
|
|
quiet: true,
|
|
|
|
failOnError: true
|
|
|
|
};
|
|
|
|
|
2014-11-12 21:32:11 +01:00
|
|
|
var args = ['-H', '127.0.0.1'];
|
|
|
|
|
2014-08-26 02:55:32 +02:00
|
|
|
var config = {
|
2014-10-10 19:33:48 +02:00
|
|
|
built_kibana: {
|
|
|
|
options: {
|
2014-10-10 19:46:06 +02:00
|
|
|
wait: false,
|
|
|
|
ready: /kibana server started/i,
|
|
|
|
quiet: true,
|
|
|
|
failOnError: false
|
2014-10-10 19:33:48 +02:00
|
|
|
},
|
2015-01-20 01:22:13 +01:00
|
|
|
cmd: './target/<%= pkg.name + "-" + pkg.version %>-' + platform + '-' + arch + '/bin/kibana',
|
2014-11-12 21:32:11 +01:00
|
|
|
args: args
|
2014-08-26 02:55:32 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
return config;
|
|
|
|
};
|