Skip to content

Commit

Permalink
chore(generate_docs): fix docs branch handling
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Feb 7, 2018
1 parent 05ca568 commit d8e6ffa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions generate_docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ const includes = CONFIG.typedoc.include || [];
includes.forEach(include => {
const { branch, package, repo } = include;
const flags = { noBuild: true, noPublish: true, noInstall: true, branch: branch };
const versionline = _exec(`yarn list --pattern ${package}`).stdout.split(/[\r\n]+/).find(line => line.includes(package));
const version = /.*\@([^@]*)/.exec(versionline)[1];

if (version) {
flags.branch = version;
if (!branch) {
const versionline = _exec(`yarn list --pattern ${package}`).stdout.split(/[\r\n]+/).find(line => line.includes(package));
const version = /.*\@([^@]*)/.exec(versionline)[1];
flags.branch = version ? version : flags.branch;
}

publishYalcPackage(path.join('.downstream_cache', package), repo, flags);
Expand Down

0 comments on commit d8e6ffa

Please sign in to comment.