Skip to content

Commit 6ca9c3a

Browse files
authored
Configure bump-my-version (#53)
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
1 parent 1c7eea3 commit 6ca9c3a

5 files changed

Lines changed: 370 additions & 1 deletion

File tree

DEVELOPMENT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ The project includes protobuf code generation for examples and tests:
7777
uv run just generate
7878
```
7979

80+
## Releasing
81+
82+
To release a new version, follow the guide in [RELEASE.md](./RELEASE.md).
83+
8084
## Documentation
8185

8286
### Building Documentation

RELEASE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Releasing connect-python
2+
3+
This document outlines how to create a release of connect-python.
4+
5+
1. Clone the repo, ensuring you have the latest main.
6+
7+
2. On a new branch, update version strings with the `bump` command, either to the next minor or patch version, based on the changes that are included in this new release.
8+
9+
- If there are only bug fixes and no new features, run `uv run just bump patch`.
10+
- If there are features being released, run `uv run just bump minor`.
11+
12+
Note the new version X.Y.Z in the updated files.
13+
14+
3. Open a PR titled "Prepare for vX.Y.Z" ([Example PR #661](https://github.com/connectrpc/connect-go/pull/661)) and a description tagging all current maintainers. Once it's reviewed and CI passes, merge it.
15+
16+
_Make sure no new commits are merged until the release is complete._
17+
18+
4. Review all commits in the new release and for each PR check an appropriate label is used and edit the title to be meaningful to end users. This will help auto-generated release notes match the final notes as closely as possible.
19+
20+
5. Using the Github UI, create a new release.
21+
22+
- Under “Select tag”, type in “vX.Y.Z” to create a new tag for the release upon publish.
23+
- Target the main branch.
24+
- Title the Release “vX.Y.Z”.
25+
- Click “set as latest release”.
26+
- Set the last version as the “Previous tag”.
27+
- Click “Generate release notes” to autogenerate release notes.
28+
- Edit the release notes. A summary and other sub categories may be added if required but should, in most cases, be left as ### Enhancements and ### Bugfixes. Feel free to collect multiple small changes to docs or Github config into one line, but try to tag every contributor. Make especially sure to credit new external contributors!
29+
30+
6. Publish the release.
31+
32+
[latest release]: https://github.com/connectrpc/connect-python/releases/latest

justfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,9 @@ generate: generate-conformance generate-example generate-test format
6969

7070
# Used in CI to verify that `just generate` doesn't produce a diff
7171
checkgenerate: generate
72-
test -z "$(git status --porcelain | tee /dev/stderr)"
72+
test -z "$(git status --porcelain | tee /dev/stderr)"
73+
74+
bump *args:
75+
uv run bump-my-version bump {{args}}
76+
uv lock
77+
cd protoc-gen-connect-python && uv lock

pyproject.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Issues = "https://github.com/connectrpc/connect-python/issues"
3838
dev = [
3939
"asgiref==3.9.1",
4040
"brotli==1.1.0",
41+
"bump-my-version==1.2.4",
4142
"connect-python-example",
4243
"daphne==4.2.1",
4344
"httpx[http2]==0.28.1",
@@ -233,3 +234,19 @@ members = ["example", "noextras"]
233234
[tool.uv.sources]
234235
connect-python = { workspace = true }
235236
connect-python-example = { workspace = true }
237+
238+
[tool.bumpversion]
239+
current_version = "0.5.0"
240+
files = [
241+
{ filename = "pyproject.toml" },
242+
{ filename = "protoc-gen-connect-python/pyproject.toml" },
243+
]
244+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
245+
serialize = ["{major}.{minor}.{patch}"]
246+
search = "version = \"{current_version}\""
247+
replace = "version = \"{new_version}\""
248+
regex = false
249+
tag = false
250+
allow_dirty = false
251+
ignore_missing_version = false
252+
commit = false

0 commit comments

Comments
 (0)