Skip to content

Commit 43ceb29

Browse files
committed
chore: update publish script
1 parent 64d393b commit 43ceb29

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/publish.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ const releaseCommitMsg = (version: string) => `release: v${version}`
2828
async function run() {
2929
let branchName: string =
3030
process.env.BRANCH ??
31-
(process.env.PR_NUMBER ? `pr-${process.env.PR_NUMBER}` : currentGitBranch())
31+
// (process.env.PR_NUMBER ? `pr-${process.env.PR_NUMBER}` : currentGitBranch())
32+
currentGitBranch()
3233

3334
const branchConfig: BranchConfig = branchConfigs[branchName] || {
3435
prerelease: true,
3536
ghRelease: false,
3637
}
3738

39+
if (!branchConfig) {
40+
console.log(`No publish config found for branch: ${branchName}`)
41+
console.log('Exiting...')
42+
process.exit(0)
43+
}
44+
3845
const isLatestBranch = branchName === latestBranch
3946
const npmTag = isLatestBranch ? 'latest' : branchName
4047

0 commit comments

Comments
 (0)