Skip to content

Commit a0fcbda

Browse files
committed
Use try catch for updating security.md and release branch
1 parent b11181f commit a0fcbda

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

scripts/publish.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ if (isPatch) {
4343
);
4444
} catch {}
4545
} else {
46-
require("./update-security-md")(`${newMajor}.${newMinor}`, `${oldMajor}.${oldMinor}`);
47-
/** Create new release branch for every Major or Minor release */
48-
execSync(`git checkout -b ${releaseBranch} && git push origin ${releaseBranch}`);
46+
try {
47+
require("./update-security-md")(`${newMajor}.${newMinor}`, `${oldMajor}.${oldMinor}`);
48+
/** Create new release branch for every Major or Minor release */
49+
execSync(`git checkout -b ${releaseBranch} && git push origin ${releaseBranch}`);
50+
} catch (err) {
51+
console.error("Error pushing to release branch: ", err);
52+
}
4953
}
5054

5155
const { visibility } = JSON.parse(execSync("gh repo view --json visibility").toString());

0 commit comments

Comments
 (0)