Skip to content

Commit

Permalink
Revert "fix(scripts/release): avoid force-push" (#25369)
Browse files Browse the repository at this point in the history
* Revert "fix(scripts/release): avoid force-push (#25140)"

This reverts commit 68ff1d9.

* chore(scripts/release): use branch variable in messages
  • Loading branch information
caugner authored Dec 10, 2024
1 parent 8d6e771 commit 39638bb
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions scripts/release/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,8 @@ const commitAndPR = async (
exec(`git commit --file ${commitFile}`),
);

const commit = exec('git rev-parse HEAD');

console.log(chalk`{blue Cherry-picking onto remote ${branch} branch...}`);
exec(`
git fetch origin ${branch} || true
git reset --hard origin/${branch} || true
git merge origin/main --strategy-option theirs
git cherry-pick ${commit} --strategy-option theirs || git cherry-pick --abort
`);

console.log(chalk`{blue Pushing ${branch} branch...}`);
exec(`git push --set-upstream origin ${branch}`);
exec(`git push --force --set-upstream origin ${branch}`);

console.log(chalk`{blue Creating/editing pull request...}`);
await temporaryWriteTask(pr.body, (bodyFile) => {
Expand Down

0 comments on commit 39638bb

Please sign in to comment.