seperated stable and unstable branches so that docs are not generated for the unstable ones

This commit is contained in:
Spencer Alger
2014-05-05 10:25:04 -07:00
parent f54826fa6b
commit 9a1cfe7c42
4 changed files with 36 additions and 18 deletions

View File

@ -93,7 +93,8 @@ function initStep() {
}
function fetchBranchesStep() {
return spawnStep('git', ['fetch', '--no-tags', 'origin'].concat(branches.map(function (b) { return b + ':' + b; })), sourceDir);
var branchArgs = branches.map(function (b) { return b + ':' + b; });
return spawnStep('git', ['fetch', '--no-tags', '--force', 'origin'].concat(branchArgs), sourceDir);
}
function removePrevArchive(branch) {
@ -121,7 +122,10 @@ function generateStep(branch) {
async.parallel([
argv.api && async.apply(require('./js_api'), branch),
argv.tests && async.apply(require('./yaml_tests'), branch)
].filter(Boolean), done);
].filter(Boolean), function () {
console.log('----\n');
done();
});
};
}

View File

@ -27,16 +27,22 @@ module.exports = function (branch, done) {
aliases = require('./aliases');
}
// generate the API
async.series([
var steps = [
readSpecFiles,
parseSpecFiles,
writeApiFile,
ensureDocsDir,
formatDocVars,
writeMethodDocs
], function (err) {
console.log('');
writeApiFile
];
if (!~utils.unstableBranches.indexOf(branch)) {
steps.push(
ensureDocsDir,
formatDocVars,
writeMethodDocs
);
}
// generate the API
async.series(steps, function (err) {
done(err);
});