diff --git a/Gruntfile.js b/Gruntfile.js index 3bebe1f350d..bb8c95df267 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -189,6 +189,42 @@ module.exports = function (grunt) { dest: '<%= pkg.name %>-latest' } ] + }, + zip_release: { + options: { + archive: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.zip' + }, + files : [ + { + expand: true, + cwd: '<%= destDir %>', + src: ['**/*'], + dest: '<%= pkg.name %>-<%= pkg.version %>' + }, + { + expand: true, + src: ['LICENSE.md', 'README.md'], + dest: '<%= pkg.name %>-<%= pkg.version %>' + } + ] + }, + tgz_release: { + options: { + archive: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz' + }, + files : [ + { + expand: true, + cwd: '<%= destDir %>', + src: ['**/*'], + dest: '<%= pkg.name %>-<%= pkg.version %>' + }, + { + expand: true, + src: ['LICENSE.md', 'README.md'], + dest: '<%= pkg.name %>-<%= pkg.version %>' + } + ] } }, s3: { @@ -206,6 +242,21 @@ module.exports = function (grunt) { dest: 'kibana/kibana/<%= pkg.name %>-latest.tar.gz', } ] + }, + release: { + bucket: 'download.elasticsearch.org', + access: 'private', + // debug: true, // uncommment to prevent actual upload + upload: [ + { + src: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.zip', + dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.zip', + }, + { + src: '<%= tempDir %>/<%= pkg.name %>-<%= pkg.version %>.tar.gz', + dest: 'kibana/kibana/<%= pkg.name %>-<%= pkg.version %>.tar.gz', + } + ] } } }; @@ -306,6 +357,16 @@ module.exports = function (grunt) { 'clean:temp' ]); + // build, then zip and upload to s3 + grunt.registerTask('release', [ + 'distribute:load_s3_config', + 'build', + 'compress:zip_release', + 'compress:tgz_release', + 's3:release', + 'clean:temp' + ]); + // 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'); diff --git a/package.json b/package.json index 440c3f9b3da..98ced79a8d5 100755 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "company": "Elasticsearch BV" }, "name": "kibana", - "version": "3.0.0m4pre", + "version": "3.0.0milestone4", "devDependencies": { "rjs-build-analysis": "0.0.3", "grunt": "~0.4.0", diff --git a/src/app/components/kbn.js b/src/app/components/kbn.js index d4b027a818c..19c88bc7ca3 100755 --- a/src/app/components/kbn.js +++ b/src/app/components/kbn.js @@ -316,6 +316,15 @@ function($, _, moment) { } unit = mathString.charAt(i++); switch (unit) { + case 'y': + if (type === 0) { + roundUp ? dateTime.endOf('year') : dateTime.startOf('year'); + } else if (type === 1) { + dateTime.add('years',num); + } else if (type === 2) { + dateTime.subtract('years',num); + } + break; case 'M': if (type === 0) { roundUp ? dateTime.endOf('month') : dateTime.startOf('month'); diff --git a/src/index.html b/src/index.html index 86aa152ba99..182fb943b4d 100755 --- a/src/index.html +++ b/src/index.html @@ -34,7 +34,7 @@