Skip to content

Commit

Permalink
Do not try to push to release branch for the first release
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Jan 6, 2025
1 parent 3a483aa commit 1eedde1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ try {
try {
execSync("pnpm changeset version");
execSync(
`git add . && git commit -m "Apply changesets and update CHANGELOG" && git push origin ${BRANCH}`,
`git add . && git commit -m "Apply changesets and update CHANGELOG [skip ci]" && git push origin ${BRANCH}`,
);
} catch {
// no changesets to be applied
Expand All @@ -35,7 +35,7 @@ const [oldMajor, oldMinor] = LATEST_VERSION.split(".");
const isPatch = newMajor === oldMajor && newMinor === oldMinor;
const releaseBranch = `release-${newMajor}.${newMinor}`;

if (isPatch) {
if (isPatch && !LATEST_VERSION.endsWith("-1")) {
// update release branch
execSync(
`git checkout ${releaseBranch} && git merge ${BRANCH} && git push origin ${releaseBranch}`,
Expand Down

0 comments on commit 1eedde1

Please sign in to comment.