cctest-recipe-upstream: derive upstream base branch (mirror main vs upstream master)
This commit is contained in:
@@ -80,4 +80,11 @@ one upgrade commit. Guard: while preparing, run
|
||||
`git merge-base <head_ref> <base_ref>`; if the result is older than a few commits below upstream
|
||||
`origin/main`, cherry-pick the upgrade commit(s) onto fresh upstream `origin/main` (branch
|
||||
`<head_ref>-rebased`), push THAT to the autonomic mirror, and emit the fetch/push/compare commands
|
||||
using the rebased branch instead of the raw one.
|
||||
using the rebased branch instead of the raw one. Also fix the stale `origin/main` wording above:
|
||||
the upstream base branch may be `master`, not `main` — derive it from the remotes.
|
||||
|
||||
**Branch-name mismatch mirror vs upstream.** The mirror and upstream can use different base-branch
|
||||
names (gitea: mirror `main`, upstream `master`). When emitting step 3 (the post-merge release),
|
||||
NEVER hardcode `main` — derive the upstream default branch from the existing remotes (`git
|
||||
remote show origin` or `git ls-remote --symref origin HEAD`) and emit `git checkout <that>;
|
||||
git fetch origin; git merge --ff-only origin/<that>;` before `abra recipe release`.
|
||||
|
||||
@@ -108,7 +108,14 @@ one upgrade commit. Guard: while preparing, run
|
||||
`git merge-base <head_ref> <base_ref>`; if the result is older than a few commits below upstream
|
||||
`origin/main`, cherry-pick the upgrade commit(s) onto fresh upstream `origin/main` (branch
|
||||
`<head_ref>-rebased`), push THAT to the autonomic mirror, and emit the fetch/push/compare commands
|
||||
using the rebased branch instead of the raw one.
|
||||
using the rebased branch instead of the raw one. Also fix the stale `origin/main` wording above:
|
||||
the upstream base branch may be `master`, not `main` — derive it from the remotes.
|
||||
|
||||
**Branch-name mismatch mirror vs upstream.** The mirror and upstream can use different base-branch
|
||||
names (gitea: mirror `main`, upstream `master`). When emitting step 3 (the post-merge release),
|
||||
NEVER hardcode `main` — derive the upstream default branch from the existing remotes (`git
|
||||
remote show origin` or `git ls-remote --symref origin HEAD`) and emit `git checkout <that>;
|
||||
git fetch origin; git merge --ff-only origin/<that>;` before `abra recipe release`.
|
||||
""",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user