Skip to content

Commit d8e6ffa

Browse files
chore(generate_docs): fix docs branch handling
1 parent 05ca568 commit d8e6ffa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generate_docs.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ const includes = CONFIG.typedoc.include || [];
2323
includes.forEach(include => {
2424
const { branch, package, repo } = include;
2525
const flags = { noBuild: true, noPublish: true, noInstall: true, branch: branch };
26-
const versionline = _exec(`yarn list --pattern ${package}`).stdout.split(/[\r\n]+/).find(line => line.includes(package));
27-
const version = /.*\@([^@]*)/.exec(versionline)[1];
2826

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

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

0 commit comments

Comments
 (0)