Skip to content

Commit a4c6641

Browse files
committed
chore: fix bug in release script
1 parent e3a6e0f commit a4c6641

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/release_tag.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ if (commitId) {
8282
// If we're releasing to production, we need to ensure the commitId is part of the master branch.
8383
const commitBranch = exec(`git branch --contains ${commitId}`)
8484
.split('\n')
85-
.map(branch => branch.trim());
85+
// the branch name will have a star in front if it's the current branch
86+
.map(branch => branch.replace('* ', '').trim());
87+
logger.info(`Commit ID "${commitId}" is part of branches: ${commitBranch}`);
8688
if (!commitBranch.includes(branch)) {
8789
logger.error(`Commit ID "${commitId}" is not part of the ${branch} branch. Aborting.`);
8890
process.exit(1);

0 commit comments

Comments
 (0)