Skip to content

Commit b854984

Browse files
committed
fix(scripts): handle --force-registry flag when no bump commits exist
Previously when no version bump commits were found, the script would exit early before checking the --force-registry flag. Now it checks for the flag and attempts to publish at HEAD even when there are no bump commits.
1 parent 7b8dfea commit b854984

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/publish-npm-packages.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,14 @@ async function main() {
585585

586586
if (bumpCommits.length === 0) {
587587
logger.info('No version bump commits found')
588+
// If --force-registry is set, still try to publish at HEAD.
589+
if (forceRegistryFlag) {
590+
logger.log(
591+
'\nForce-registry flag is set, checking HEAD for unpublished packages...',
592+
)
593+
const headSha = await getCommitSha('HEAD')
594+
await publishAtCommit(headSha)
595+
}
588596
return
589597
}
590598

0 commit comments

Comments
 (0)