mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge branch 'pr/3151'
This commit is contained in:
commit
0c64bffd34
4 changed files with 15 additions and 3 deletions
|
@ -44,7 +44,8 @@ var config = module.exports = {
|
|||
bundled_plugins_folder : path.resolve(public_folder, 'plugins'),
|
||||
kibana : kibana,
|
||||
package : require(packagePath),
|
||||
htpasswd : htpasswdPath
|
||||
htpasswd : htpasswdPath,
|
||||
buildNum : '@@buildNum'
|
||||
};
|
||||
|
||||
config.plugins = listPlugins(config);
|
||||
|
|
|
@ -14,11 +14,18 @@ module.exports = function (response) {
|
|||
var body = _.find(response.hits.hits, isUpgradeable);
|
||||
if (!body) return Promise.resolve();
|
||||
|
||||
// if the build number is still the template string (which it wil be in development)
|
||||
// then we need to set it to the max interger. Otherwise we will set it to the build num
|
||||
body._source.buildNum = (/^@@/.test(config.buildNum)) ? Math.pow(2, 53) - 1 : parseInt(config.buildNum, 10);
|
||||
|
||||
return client.create({
|
||||
index: config.kibana.kibana_index,
|
||||
type: 'config',
|
||||
body: body._source,
|
||||
id: config.package.version
|
||||
}).catch(function (err) {
|
||||
// Ignore document already exists exceptions for beta and snapshot upgrades.
|
||||
if (/DocumentAlreadyExistsException/.test(err.message) && /beta|snapshot/.test(config.package.version)) return;
|
||||
throw err;
|
||||
});
|
||||
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@ module.exports = function (grunt) {
|
|||
{
|
||||
expand: true,
|
||||
cwd: '<%= server %>/config/',
|
||||
src: '**',
|
||||
src: '*.yml',
|
||||
dest: '<%= build %>/kibana/config'
|
||||
},
|
||||
{
|
||||
|
|
|
@ -22,6 +22,10 @@ module.exports = function (grunt) {
|
|||
{
|
||||
src: [join(src, 'server', 'bin', 'kibana.bat')],
|
||||
dest: join(build, 'dist', 'kibana', 'bin', 'kibana.bat')
|
||||
},
|
||||
{
|
||||
src: [join(src, 'server', 'config', 'index.js')],
|
||||
dest: join(build, 'dist', 'kibana', 'src', 'config', 'index.js')
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue