From d8e6ffa3076e2b3c896439e7e0d6948aa1652b67 Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Wed, 7 Feb 2018 15:56:30 -0800 Subject: [PATCH] chore(generate_docs): fix docs branch handling --- generate_docs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generate_docs.js b/generate_docs.js index db65260..1141c39 100755 --- a/generate_docs.js +++ b/generate_docs.js @@ -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);