kibana/tasks/config/copy.js
Chris Cowan 5d39d334ea Closes #355 - Make bin/kibana executable in the tar and zip archives
grunt-compress is broken it does not honor the `mode` option when tyring
to set the permissions on a file. This is broken through out the entire
Grunt project (grunt-contrib-copy doesn't honor it, grunt-replace
doesn't honor it... as far as I can tell nothing does). SO instead of
wasting more time trying to get it to work (I already wasted an hour on
it) I decided to fall back to just writing a 10 minute script that
actually works. If you are intent on using a pure Grunt task to make it
work feel free to go do that rabit hole.
2014-09-23 07:02:34 -07:00

68 lines
1.4 KiB
JavaScript

module.exports = function (grunt) {
var config = {
kibana_src: {
expand: true,
cwd: '<%= app %>',
src: '**',
dest: '<%= build %>/src/'
},
server_src: {
files: [
{
src: '<%= src %>/server/Gemfile',
dest: '<%= build %>/kibana/Gemfile'
},
{
src: '<%= src %>/server/Gemfile.lock',
dest: '<%= build %>/kibana/Gemfile.lock'
},
{
src: '<%= src %>/server/bin/initialize',
dest: '<%= build %>/kibana/bin/initialize'
},
{
expand: true,
cwd: '<%= src %>/server/config/',
src: '**',
dest: '<%= build %>/kibana/config'
},
{
expand: true,
cwd: '<%= src %>/server/lib/',
src: '**',
dest: '<%= build %>/kibana/lib'
},
{
expand: true,
cwd: '<%= src %>/server/routes/',
src: '**',
dest: '<%= build %>/kibana/routes'
}
]
},
dist: {
options: { mode: true },
files: [
{
expand: true,
cwd: '<%= build %>/kibana/',
src: '*.jar',
dest: '<%= build %>/dist/kibana/lib/'
},
{
expand: true,
cwd: '<%= src %>/server/config/',
src: 'kibana.yml',
dest: '<%= build %>/dist/kibana/config/'
}
]
}
};
return config;
};