Skip to content

Commit

Permalink
ignore push to release branch if throws any errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jan 6, 2025
1 parent bb9e5ac commit f135e3a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ const [oldMajor, oldMinor] = LATEST_VERSION.split(".");
const isPatch = newMajor === oldMajor && newMinor === oldMinor;
const releaseBranch = `release-${newMajor}.${newMinor}`;

if (isPatch && !LATEST_VERSION.endsWith("-1")) {
if (isPatch) {
// update release branch
execSync(
`git checkout ${releaseBranch} && git merge ${BRANCH} && git push origin ${releaseBranch}`,
);
try {
execSync(
`git checkout ${releaseBranch} && git merge ${BRANCH} && git push origin ${releaseBranch}`,
);
} catch {}
} else {
require("./update-security-md")(`${newMajor}.${newMinor}`, `${oldMajor}.${oldMinor}`);
/** Create new release branch for every Major or Minor release */
Expand Down

0 comments on commit f135e3a

Please sign in to comment.