Skip to content

Commit 093081c

Browse files
Update instructions for merging release branch into master (#353)
Documens the process of crystal-lang/crystal#15422, described in crystal-lang/crystal#15414 (comment)
1 parent 941866d commit 093081c

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

processes/crystal-release.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,27 @@ Add an issue `Crystal release X.Y.Z` in https://github.com/crystal-lang/distribu
118118
4. [ ] Update default base version in test-ecosystem: [`test-ecosystem:scripts/release-update.sh ${VERSION}`](https://github.com/crystal-lang/test-ecosystem/blob/master/scripts/release-update.sh)
119119
5. [ ] Merge `release/${VERSION%.*}` branch into `master` (if the two have diverged)
120120
- This needs to be a *merge commit*. Those are disabled in the GitHub UI.
121-
- `git switch master && git pull && git merge release/${VERSION%.*}; git checkout master src/VERSION && git add src/VERSION && git commit`
122-
- Double check merge commit history is as expected
123-
- `git push` (GitHub branch protection rules normally prevent direct pushes to
121+
- Create branch and PR:
122+
```sh
123+
git fetch upstream release/${VERSION%.*} master
124+
git switch -c merge/${VERSION} upstream/master
125+
git merge upstream/release/${VERSION%.*}
126+
# resolve conflicts
127+
git commit -m 'Merge `release/${VERSION%.*}` into master'
128+
git log --graph --decorate --pretty=oneline --abbrev-commit
129+
git push -u upstream merge/${VERSION}
130+
gh pr create --title 'Merge `release/${VERSION%.*}` into master' --label 'topic:infrastructure'
131+
```
132+
- Merge PR **locally**:
133+
```sh
134+
git switch master
135+
git merge --ff-only merge/${VERSION}
136+
# double check history
137+
git log --graph --decorate --pretty=oneline --abbrev-commit
138+
git push
139+
```
140+
- GitHub branch protection rules normally prevent direct pushes to
124141
`master`. This needs to be deactivated for this purpose, which can be on a
125-
per-user basis.)
142+
per-user basis.
143+
- In case master has diverged, `--ff-only` merge will fail. Then you can
144+
first rebase `merge/${VERSION}` on current master with `git rebase master --rebase-merges`.

0 commit comments

Comments
 (0)