summaryrefslogtreecommitdiff
path: root/tools/release
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-01 12:58:55 -0400
committerGitHub <noreply@github.com>2023-04-01 16:58:55 +0000
commit30065af0f2fe9a00c648a829572d6872c7f80970 (patch)
treed789880e473d7575aa0821eb82377bf011e8538c /tools/release
parentbac8e4f6f25367cf5b6c2095249cf144035a4fbd (diff)
chore(release): improve merge commit back to main for patch releases (#18554)
This change commits with conflicts that can then be resolved manually.
Diffstat (limited to 'tools/release')
-rwxr-xr-xtools/release/04_post_publish.ts21
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/release/04_post_publish.ts b/tools/release/04_post_publish.ts
index deadac80b..207a89a0e 100755
--- a/tools/release/04_post_publish.ts
+++ b/tools/release/04_post_publish.ts
@@ -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` +