Skip to content

Commit b0f44eb

Browse files
Aditya JoshiAditya Joshi
authored andcommitted
Added env var support for baseline & current branch
1 parent a5c532f commit b0f44eb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

commands/storybook.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ async function storybook(serve, options) {
115115

116116
let commit = await getLastCommit();
117117
let baseLine;
118-
if (process.env.BASELINE_BRANCH !== undefined && process.env.BASELINE_BRANCH !== null && process.env.BASELINE_BRANCH !== '') {
119-
baseLine = process.env.BASELINE_BRANCH
120-
}
118+
if (process.env.BASELINE_BRANCH !== undefined && process.env.BASELINE_BRANCH !== null && process.env.BASELINE_BRANCH !== '')
119+
baseLine = process.env.BASELINE_BRANCH
120+
console.log(`Baseline branch set :${baseLine}`)
121121
let payload = {
122122
downloadURL: url.substring(url.search(/.com/)+5, url.search(/.zip/)+4),
123123
uploadId: uploadId,
@@ -130,10 +130,10 @@ async function storybook(serve, options) {
130130
customViewports: storybookConfig.customViewports
131131
},
132132
git: {
133-
branch: process.env.BRANCH_NAME ? process.env.BRANCH_NAME: commit.branch,
134-
commitId: commit.shortHash,
135-
commitAuthor: commit.author.name,
136-
commitMessage: commit.subject,
133+
branch: process.env.BRANCH_NAME ? process.env.BRANCH_NAME: commit.branch,
134+
commitId: commit.shortHash,
135+
commitAuthor: commit.author.name,
136+
commitMessage: commit.subject,
137137
githubURL: process.env.GITHUB_URL || '',
138138
},
139139
buildName: buildName,

0 commit comments

Comments
 (0)