1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 16:49:18 -05:00

chore(release): improve merge commit back to main for patch releases (#18554)

This change commits with conflicts that can then be resolved manually.
This commit is contained in:
David Sherret 2023-04-01 12:58:55 -04:00 committed by GitHub
parent bac8e4f6f2
commit 30065af0f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,13 +51,18 @@ async function forwardReleaseCommitToMain() {
newBranchName,
"origin/main",
]);
await repo.command([
const cherryPickResult = await repo.command([
"git",
"cherry-pick",
"--strategy-option",
"theirs",
releaseCommitHash,
]);
]).noThrow();
if (cherryPickResult.code !== 0) {
// commit with conflicts that can be resolved in the PR
await repo.command("git add .");
await repo.command(
'git commit --no-verify -m "Cherry-pick version bump commit with conflicts"',
).noThrow();
}
await repo.gitPush("origin", newBranchName);
$.logStep(`Opening PR...`);
@ -75,7 +80,13 @@ async function forwardReleaseCommitToMain() {
$.log(`Opened PR at ${openedPr.data.url}`);
function getPrBody() {
let text =
let text = "";
if (cherryPickResult.code !== 0) {
text += `**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**\n\n`;
}
text +=
`This is the release commit being forwarded back to main for ${cliCrate.version}\n\n` +
`Please ensure:\n` +
`- [ ] Everything looks ok in the PR\n` +