Merge pull request #476 from rashidkpc/master

\(*T▽T*)/
∗˚(* ˃̤൬˂̤ *)˚∗
ヾ(@^▽^@)ノ
∗˚(* ˃̤൬˂̤ *)˚∗
σ(≧ε≦o)
˚‧*♡ॢ˃̶̤̀◡˂̶̤́♡ॢ*‧˚
୧(﹒︠ᴗ﹒︡)୨
ヾ(@^▽^@)ノ
\(T∇T)/
(*≧▽≦)
This commit is contained in:
Joe Fleming 2014-10-03 17:41:47 -07:00
commit c662f93a48
5 changed files with 41 additions and 2 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.aws-config.json
.DS_Store
node_modules
bower_components

View file

@ -39,7 +39,8 @@
"request": "^2.40.0",
"requirejs": "~2.1.14",
"rjs-build-analysis": "0.0.3",
"tar": "^1.0.1"
"tar": "^1.0.1",
"grunt-s3": "~0.2.0-alpha.3"
},
"scripts": {
"test": "grunt test --use-jruby",

View file

@ -16,7 +16,7 @@ define(function (require) {
return indexPatterns.getIds()
.then(function (patterns) {
if (!config.get('defaultIndex')) {
throw new NoDefaultIndexPattern();
kbnUrl.change('/settings/indices');
}
});
}

19
tasks/config/s3.js Normal file
View file

@ -0,0 +1,19 @@
module.exports = function (config) {
return {
release: {
bucket: 'download.elasticsearch.org',
access: 'private',
//debug: true, // uncommment to prevent actual upload
upload: [
{
src: 'target/<%= pkg.name %>-<%= pkg.version %>.zip',
dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.zip',
},
{
src: 'target/<%= pkg.name %>-<%= pkg.version %>.tar.gz',
dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.tar.gz',
}
]
}
};
};

18
tasks/release.js Normal file
View file

@ -0,0 +1,18 @@
module.exports = function (grunt) {
// build, then zip and upload to s3
grunt.registerTask('release', [
'distribute:load_s3_config',
'build',
's3:release',
]);
// collect the key and secret from the .aws-config.json file, finish configuring the s3 task
grunt.registerTask('distribute:load_s3_config', function () {
var config = grunt.file.readJSON('.aws-config.json');
grunt.config('s3.options', {
key: config.key,
secret: config.secret
});
});
};