kibana/tasks/config/s3.js
Spencer Alger a5ffd91277 [lodash] audit _() usage to ensure compatibility with lodash 3.0
Starting in lodash 3.0 _() chains are lazily evaluated and therefor usage of the pattern had to be checked for side effects. Where it made more sense to just use Array methods, the code was updated. In other places the code was already calling .value() on the chain, so no changes were needed. Finally, there were places where the chain was not designed to produce a value, but to modify a value that was already in scope (like this/self), in those senarios .commit() was added to force evaluation of the chain.
2015-06-11 18:27:18 -07:00

32 lines
722 B
JavaScript

var createPackages = require('../create_packages');
var _ = require('lodash');
var getBaseNames = createPackages.getBaseNames;
module.exports = function (grunt) {
var upload = _(getBaseNames(grunt))
.map(function (basename) {
return [
basename + '.tar.gz',
basename + '.tar.gz.sha1.txt',
basename + '.zip',
basename + '.zip.sha1.txt'
];
})
.flatten()
.map(function (filename) {
return {
src: 'target/' + filename,
dest: 'kibana/kibana/' + filename
};
})
.value();
return {
release: {
bucket: 'download.elasticsearch.org',
access: 'private',
// debug: true, // uncommment to prevent actual upload
upload: upload
}
};
};