mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Added kibana tag/branch/revision pinning.
This commit is contained in:
parent
b68dda7027
commit
d64283f59e
6 changed files with 35 additions and 4 deletions
|
@ -5,6 +5,7 @@ module.exports = function (grunt) {
|
|||
var config = {
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
kibanaCheckoutDir: './vendor/kibana',
|
||||
kibanaRevision: 'master',
|
||||
exporterDir: 'exporter',
|
||||
buildDir: 'build',
|
||||
packageDir: 'packages',
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-compress": "~0.5.2",
|
||||
"grunt-git": "~0.1.6",
|
||||
"grunt-s3": "~0.2.0-alpha.2",
|
||||
"grunt-ngmin": "0.0.3",
|
||||
"grunt-contrib-less": "~0.7.0",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module.exports = function (grunt) {
|
||||
|
||||
grunt.registerTask('build', [
|
||||
'shell:verify_kibana_status',
|
||||
'clean:build',
|
||||
'shell:maven_clean',
|
||||
'shell:maven_package',
|
||||
|
|
|
@ -2,7 +2,7 @@ module.exports = function (config) {
|
|||
return {
|
||||
kibana: {
|
||||
options: {
|
||||
repository: 'https://github.com/elasticsearch/kibana.git',
|
||||
repository: 'git://github.com/elasticsearch/kibana.git',
|
||||
directory: '<%= kibanaCheckoutDir %>'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,36 @@ module.exports = function (config) {
|
|||
cwd: '<%= buildTempDir %>',
|
||||
}
|
||||
}
|
||||
},
|
||||
verify_kibana_status: {
|
||||
command: [ 'test -z "`git status --porcelain`"', 'git diff-index --quiet <%= kibanaRevision %> --' ].join("&&"),
|
||||
options: {
|
||||
stdout: true,
|
||||
stderr: true,
|
||||
failOnError: true,
|
||||
execOptions: {
|
||||
cwd: '<%= kibanaCheckoutDir %>',
|
||||
},
|
||||
callback: function (error, stdout, stderr, cb) {
|
||||
if (error) {
|
||||
require("grunt").fatal("Kibana checkout is dirty or not on the right branch");
|
||||
}
|
||||
cb();
|
||||
}
|
||||
}
|
||||
},
|
||||
clone_kibana: {
|
||||
command: [ 'git clone git://github.com/elasticsearch/kibana.git <%= kibanaCheckoutDir %>',
|
||||
'cd <%= kibanaCheckoutDir %>',
|
||||
'git checkout <%= kibanaRevision %>'
|
||||
].join('&&'),
|
||||
options: {
|
||||
stdout: true,
|
||||
stderr: true,
|
||||
failOnError: true,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = function (grunt) {
|
||||
grunt.registerTask('setup', [
|
||||
'clean:setup',
|
||||
'gitclone:kibana'
|
||||
'shell:clone_kibana'
|
||||
]);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue