Skip to content

Commit 643f77c

Browse files
committed
use tbump to bump versions
ensures baseVersion is always in sync with tag
1 parent 70afc74 commit 643f77c

File tree

3 files changed

+45
-5
lines changed

3 files changed

+45
-5
lines changed

RELEASE.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ Also the images we build are based on some image specified in the `FROM` stateme
6565
```bash
6666
git checkout main
6767
git reset --hard <upstream>/main
68-
git tag -a x.y.z-beta.1 -m x.y.z-beta.1 <commit on main>
69-
git push --follow-tags <upstream> main
68+
tbump x.y.z-beta.1
7069
```
7170

7271
- Announce the x.y.z-beta.1 release
@@ -89,11 +88,14 @@ Also the images we build are based on some image specified in the `FROM` stateme
8988
```bash
9089
git checkout main
9190
git reset --hard <upstream>/main
92-
git tag -a x.y.z -m x.y.z HEAD
93-
git push --follow-tags <upstream> main
91+
tbump x.y.z
9492
```
9593

96-
- [ ] Update baseVersion in chartpress to the next release (e.g. `2.1.0-0.dev` after 2.0.0)
94+
- [ ] Set the next prerelease version (don't create a tag).
95+
96+
```bash
97+
tbump --no-tag x.y+1.z-0.dev
98+
```
9799
98100
- [ ] Create a GitHub release.
99101
Visit the [release page](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/releases) and create a new release referencing the recent tag. Add a brief text like the one below.

dev-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ click
1717

1818
# used to formatting and linting
1919
pre-commit>=2.0.0
20+
21+
# used for tagging releases
22+
tbump

tbump.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# tbump config sets baseVersion in chartpress.yaml
2+
[version]
3+
current = "2.0.0-0.dev"
4+
5+
# match our prerelease prefixes
6+
# -alpha.1
7+
# -beta.2
8+
# -0.dev
9+
10+
regex = '''
11+
(?P<major>\d+)
12+
\.
13+
(?P<minor>\d+)
14+
\.
15+
(?P<patch>\d+)
16+
(\-
17+
(?P<prelease>
18+
(
19+
(alpha|beta|rc)\.\d+|
20+
0\.dev
21+
)
22+
)
23+
)?
24+
'''
25+
26+
[git]
27+
message_template = "Bump to {new_version}"
28+
tag_template = "{new_version}"
29+
30+
# For each file to patch, add a [[file]] config
31+
# section containing the path of the file, relative to the
32+
# tbump.toml location.
33+
[[file]]
34+
src = "chartpress.yaml"
35+
search = 'baseVersion: "{current_version}"'

0 commit comments

Comments
 (0)