diff --git a/scripts/_spawn.js b/scripts/_spawn.js index c0ffa7b0b..f84508b21 100644 --- a/scripts/_spawn.js +++ b/scripts/_spawn.js @@ -44,6 +44,6 @@ function _spawn(cmd, args, opts, cb) { return cp; } -_spawn.exec = function (cmd, cb) { - return _spawn('/bin/sh', ['-c', cmd], cb); +_spawn.exec = function (cmd, opts, cb) { + return _spawn('/bin/sh', ['-c', cmd], opts, cb); }; \ No newline at end of file diff --git a/scripts/generate/index.js b/scripts/generate/index.js index 501db1de3..ae047968e 100644 --- a/scripts/generate/index.js +++ b/scripts/generate/index.js @@ -89,8 +89,8 @@ function cloneStep() { }; } -function fetchBranchStep(branch) { - return spawnStep('git', ['fetch', '--depth', '1', 'origin', branch], sourceDir); +function fetchBranchesStep() { + return spawnStep('git', ['fetch', '--depth', '1', 'origin'].concat(branches), sourceDir); } function removePrevArchive(branch) { @@ -123,12 +123,12 @@ function generateStep(branch) { } var steps = [ - cloneStep() + cloneStep(), + fetchBranchesStep() ]; branches.forEach(function (branch) { if (argv.update) steps.push(removePrevArchive(branch)); steps.push( - fetchBranchStep(branch), createArchive(branch), generateStep(branch) ); diff --git a/scripts/generate/js_api.js b/scripts/generate/js_api.js index 5be8719b3..d40e8159d 100644 --- a/scripts/generate/js_api.js +++ b/scripts/generate/js_api.js @@ -18,7 +18,7 @@ module.exports = function (branch, done) { var docVars; // slightly modified clone of apiSpec for the docs var branchSuffix = utils.branchSuffix(branch); - var esDir = fromRoot('src/elasticsearch_' + _.snakeCase(branch)); + var esDir = fromRoot('src/_elasticsearch_' + _.snakeCase(branch)); var aliases; try { aliases = require('./aliases_' + _.snakeCase(branch)); diff --git a/scripts/generate/yaml_tests.js b/scripts/generate/yaml_tests.js index 1684473a4..eed151ee1 100644 --- a/scripts/generate/yaml_tests.js +++ b/scripts/generate/yaml_tests.js @@ -11,7 +11,7 @@ module.exports = function (branch, done) { var _ = require(fromRoot('src/lib/utils')); var tests = {}; // populated in readYamlTests - var esDir = fromRoot('src/elasticsearch_' + _.snakeCase(branch)); + var esDir = fromRoot('src/_elasticsearch_' + _.snakeCase(branch)); // generate the yaml tests async.series([