@coze-arch/rush-publish-plugin 0.0.5-alpha.8b5f6f → 0.0.5-alpha.e4e8c6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +6 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -484,7 +484,7 @@ const checkReleasePlan = (
|
|
|
484
484
|
!allowBranches.includes(branchName)
|
|
485
485
|
) {
|
|
486
486
|
throw new Error(
|
|
487
|
-
`For LATEST release, should be on one of these branches: ${allowBranches.join(', ')}
|
|
487
|
+
`For LATEST release, should be on one of these branches: ${allowBranches.join(', ')}. Current Branch: ${branchName}`,
|
|
488
488
|
);
|
|
489
489
|
}
|
|
490
490
|
return true;
|
|
@@ -1591,7 +1591,11 @@ const publish = async (options) => {
|
|
|
1591
1591
|
const isBetaPublish = [BumpType.BETA, BumpType.ALPHA].includes(
|
|
1592
1592
|
bumpPolicy ,
|
|
1593
1593
|
);
|
|
1594
|
-
if (
|
|
1594
|
+
if (
|
|
1595
|
+
process.env.SKIP_BRANCH_CHECK !== 'true' &&
|
|
1596
|
+
isBetaPublish === false &&
|
|
1597
|
+
(await isMainBranch()) === false
|
|
1598
|
+
) {
|
|
1595
1599
|
// 只允许在主分支发布
|
|
1596
1600
|
logger.error(
|
|
1597
1601
|
'You are not in main branch, please switch to main branch and try again.',
|