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.
29 lines
692 B
JavaScript
29 lines
692 B
JavaScript
var join = require('path').join;
|
|
module.exports = function (grunt) {
|
|
var pkg = grunt.config.get('pkg');
|
|
var build = grunt.config.get('build');
|
|
var src = grunt.config.get('src');
|
|
var config = {
|
|
dist: {
|
|
options: {
|
|
patterns: [
|
|
{ match: 'version', replacement: pkg.version }
|
|
]
|
|
},
|
|
files: [
|
|
{
|
|
src: [join(src, 'server', 'bin', 'kibana.sh')],
|
|
dest: join(build, 'dist', 'kibana', 'bin', 'kibana'),
|
|
mode: 0755
|
|
},
|
|
{
|
|
src: [join(src, 'server', 'bin', 'kibana.bat')],
|
|
dest: join(build, 'dist', 'kibana', 'bin', 'kibana.bat')
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|
|
return config;
|
|
};
|