2014-08-26 02:55:32 +02:00
|
|
|
module.exports = function (grunt) {
|
2014-10-03 19:16:29 +02:00
|
|
|
var version = grunt.config.get('pkg.version');
|
2015-01-09 19:08:14 +01:00
|
|
|
var platforms = grunt.config.get('platforms');
|
2014-08-26 02:55:32 +02:00
|
|
|
var config = {
|
|
|
|
|
|
|
|
kibana_src: {
|
|
|
|
expand: true,
|
|
|
|
cwd: '<%= app %>',
|
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/src/'
|
|
|
|
},
|
|
|
|
|
|
|
|
server_src: {
|
2014-09-08 19:26:02 +02:00
|
|
|
files: [
|
|
|
|
{
|
2015-01-09 19:08:14 +01:00
|
|
|
src: '<%= root %>/package.json',
|
|
|
|
dest: '<%= build %>/kibana/package.json'
|
2014-09-08 19:26:02 +02:00
|
|
|
},
|
|
|
|
{
|
2015-01-09 19:08:14 +01:00
|
|
|
src: '<%= server %>/app.js',
|
|
|
|
dest: '<%= build %>/kibana/app.js'
|
2014-09-08 19:26:02 +02:00
|
|
|
},
|
|
|
|
{
|
2015-01-09 19:08:14 +01:00
|
|
|
src: '<%= server %>/index.js',
|
|
|
|
dest: '<%= build %>/kibana/index.js'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: '<%= server %>/bin/',
|
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/kibana/bin'
|
2014-09-08 19:26:02 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
2014-10-09 00:36:35 +02:00
|
|
|
cwd: '<%= server %>/config/',
|
2015-02-26 02:57:39 +01:00
|
|
|
src: '*.yml',
|
2014-09-08 19:26:02 +02:00
|
|
|
dest: '<%= build %>/kibana/config'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
2014-10-09 00:36:35 +02:00
|
|
|
cwd: '<%= server %>/lib/',
|
2014-09-08 19:26:02 +02:00
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/kibana/lib'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
2014-10-09 00:36:35 +02:00
|
|
|
cwd: '<%= server %>/routes/',
|
2014-09-08 19:26:02 +02:00
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/kibana/routes'
|
2015-01-09 19:08:14 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: '<%= server %>/views/',
|
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/kibana/views'
|
2014-09-08 19:26:02 +02:00
|
|
|
}
|
|
|
|
]
|
2014-08-26 02:55:32 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
dist: {
|
|
|
|
options: { mode: true },
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
expand: true,
|
2015-01-09 19:08:14 +01:00
|
|
|
cwd: '<%= build %>/kibana',
|
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/dist/kibana/src'
|
2014-08-26 02:55:32 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
2014-10-09 00:36:35 +02:00
|
|
|
cwd: '<%= server %>/config/',
|
2014-08-26 02:55:32 +02:00
|
|
|
src: 'kibana.yml',
|
2014-09-23 16:02:34 +02:00
|
|
|
dest: '<%= build %>/dist/kibana/config/'
|
2015-05-22 23:51:18 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
expand: true,
|
|
|
|
cwd: '<%= bowerComponentsDir %>/ace-builds/src-noconflict/',
|
|
|
|
src: 'worker-json.js',
|
|
|
|
dest: '<%= build %>/dist/kibana/src/public/'
|
2014-08-26 02:55:32 +02:00
|
|
|
}
|
|
|
|
]
|
2014-10-03 19:16:29 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
versioned_dist: {
|
|
|
|
options: { mode: true },
|
2015-01-09 19:08:14 +01:00
|
|
|
files: []
|
2014-11-06 23:18:16 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
plugin_readme: {
|
|
|
|
files: [
|
|
|
|
{
|
|
|
|
src: '<%= build %>/kibana/public/plugins/README.txt',
|
|
|
|
dest: '<%= build %>/dist/kibana/plugins/README.txt'
|
|
|
|
}
|
|
|
|
]
|
2014-08-26 02:55:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2015-01-09 19:08:14 +01:00
|
|
|
platforms.forEach(function (platform) {
|
|
|
|
config.versioned_dist.files.push({
|
|
|
|
expand: true,
|
|
|
|
cwd: '<%= build %>/dist/kibana',
|
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/dist/kibana-' + version + '-' + platform
|
|
|
|
});
|
|
|
|
config.versioned_dist.files.push({
|
|
|
|
expand: true,
|
2015-01-16 20:47:43 +01:00
|
|
|
cwd: '<%= root %>/.node_binaries/' + platform,
|
2015-01-09 19:08:14 +01:00
|
|
|
src: '**',
|
|
|
|
dest: '<%= build %>/dist/kibana-' + version + '-' + platform + '/node'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2014-08-26 02:55:32 +02:00
|
|
|
return config;
|
|
|
|
};
|