Skip to content

Commit f135e3a

Browse files
committed
ignore push to release branch if throws any errors
1 parent bb9e5ac commit f135e3a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/publish.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ const [oldMajor, oldMinor] = LATEST_VERSION.split(".");
3535
const isPatch = newMajor === oldMajor && newMinor === oldMinor;
3636
const releaseBranch = `release-${newMajor}.${newMinor}`;
3737

38-
if (isPatch && !LATEST_VERSION.endsWith("-1")) {
38+
if (isPatch) {
3939
// update release branch
40-
execSync(
41-
`git checkout ${releaseBranch} && git merge ${BRANCH} && git push origin ${releaseBranch}`,
42-
);
40+
try {
41+
execSync(
42+
`git checkout ${releaseBranch} && git merge ${BRANCH} && git push origin ${releaseBranch}`,
43+
);
44+
} catch {}
4345
} else {
4446
require("./update-security-md")(`${newMajor}.${newMinor}`, `${oldMajor}.${oldMinor}`);
4547
/** Create new release branch for every Major or Minor release */

0 commit comments

Comments
 (0)