Skip to content

Commit 487796b

Browse files
rickeylevaignas
andauthored
docs: tell how to create a release branch for patch releases (#2329)
This adds some doc for how to create a branch when a patch release needs to be based on the original release and not from head. --------- Co-authored-by: Ignas Anikevicius <[email protected]>
1 parent 2f04951 commit 487796b

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

DEVELOPING.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Start from a clean checkout at `main`.
2424
Before running through the release it's good to run the build and the tests locally, and make sure CI is passing. You can
2525
also test-drive the commit in an existing Bazel workspace to sanity check functionality.
2626

27+
### Releasing from HEAD
28+
2729
#### Steps
2830
1. [Determine the next semantic version number](#determining-semantic-version)
2931
1. Create a tag and push, e.g. `git tag 0.5.0 upstream/main && git push upstream --tags`
@@ -42,9 +44,31 @@ To find if there were any features added or incompatible changes made, review
4244
the commit history. This can be done using github by going to the url:
4345
`https://github.com/bazelbuild/rules_python/compare/<VERSION>...main`.
4446

47+
### Patch release with cherry picks
48+
49+
If a patch release from head would contain changes that aren't appropriate for
50+
a patch release, then the patch release needs to be based on the original
51+
release tag and the patch changes cherry-picked into it.
52+
53+
In this example, release `0.37.0` is being patched to create release `0.37.1`.
54+
The fix being included is commit `deadbeef`.
55+
56+
1. `git checkout -b release/0.37 0.37.0`
57+
1. `git push upstream release/0.37`
58+
1. `git cherry-pick -x deadbeef`
59+
1. Fix merge conflicts, if any. If `MODULE.bazel.lock` conflicts occur, then
60+
run `pre-commit run update-bzlmod-lockfiles -a`
61+
1. `git cherry-pick --continue` (if applicable)
62+
1. `git push upstream`
63+
64+
If multiple commits need to be applied, repeat the `git cherry-pick` step for
65+
each.
66+
67+
Once the release branch is in the desired state, use `git tag` to tag it, as
68+
done with a release from head. Release automation will do the rest.
69+
4570
#### After release creation in Github
4671

47-
1. Ping @philwo to get the new release added to mirror.bazel.build. See [this comment on issue #400](https://github.com/bazelbuild/rules_python/issues/400#issuecomment-779159530) for more context.
4872
1. Announce the release in the #python channel in the Bazel slack (bazelbuild.slack.com).
4973

5074
## Secrets

0 commit comments

Comments
 (0)