Skip to content

Commit 4413d94

Browse files
committed
doc how to create release branch for patch release
1 parent 797cbe8 commit 4413d94

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
@@ -20,6 +20,8 @@ Start from a clean checkout at `main`.
2020
Before running through the release it's good to run the build and the tests locally, and make sure CI is passing. You can
2121
also test-drive the commit in an existing Bazel workspace to sanity check functionality.
2222

23+
### Releasing from HEAD
24+
2325
#### Steps
2426
1. [Determine the next semantic version number](#determining-semantic-version)
2527
1. Create a tag and push, e.g. `git tag 0.5.0 upstream/main && git push upstream --tags`
@@ -38,9 +40,31 @@ To find if there were any features added or incompatible changes made, review
3840
the commit history. This can be done using github by going to the url:
3941
`https://github.com/bazelbuild/rules_python/compare/<VERSION>...main`.
4042

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

43-
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.
4468
1. Announce the release in the #python channel in the Bazel slack (bazelbuild.slack.com).
4569

4670
## Secrets

0 commit comments

Comments
 (0)