Skip to content

Commit 7a1161a

Browse files
authored
Merge pull request #2860 from minrk/chartpress-2
Update chartpress to 2.1+ and adopt tbump in the release process
2 parents 81aa3eb + f7b7362 commit 7a1161a

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

RELEASE.md

Lines changed: 8 additions & 4 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,8 +88,13 @@ 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
92+
```
93+
94+
- [ ] Set the next prerelease version (don't create a tag).
95+
96+
```bash
97+
tbump --no-tag x.y.z+1-0.dev
9498
```
9599
96100
- [ ] Create a GitHub release.

chartpress.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ charts:
1313
# Dev: imagePrefix can be useful to override if you want to trial something
1414
# locally developed in a remote k8s cluster.
1515
imagePrefix: jupyterhub/k8s-
16+
baseVersion: "2.0.0-beta.1"
1617
repo:
1718
git: jupyterhub/helm-chart
1819
published: https://jupyterhub.github.io/helm-chart

dev-requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# ref: https://github.com/jupyterhub/chartpress
77
#
8-
chartpress>=1.1.0
8+
chartpress>=2.1,<3
99

1010
# pytest run tests that require requests and pyyaml
1111
pytest>=3.7.1
@@ -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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# tbump is a tool to update version fields that we use
2+
# to update baseVersion in chartpress.yaml as documented
3+
# in RELEASE.md
4+
#
5+
# Config reference: https://github.com/your-tools/tbump#readme
6+
#
7+
[version]
8+
current = "2.0.0-beta.1"
9+
10+
# match our prerelease prefixes
11+
# -alpha.1
12+
# -beta.2
13+
# -0.dev
14+
15+
regex = '''
16+
(?P<major>\d+)
17+
\.
18+
(?P<minor>\d+)
19+
\.
20+
(?P<patch>\d+)
21+
(\-
22+
(?P<prelease>
23+
(
24+
(alpha|beta|rc)\.\d+|
25+
0\.dev
26+
)
27+
)
28+
)?
29+
'''
30+
31+
[git]
32+
message_template = "Bump to {new_version}"
33+
tag_template = "{new_version}"
34+
35+
# For each file to patch, add a [[file]] config
36+
# section containing the path of the file, relative to the
37+
# tbump.toml location.
38+
[[file]]
39+
src = "chartpress.yaml"
40+
search = 'baseVersion: "{current_version}"'

0 commit comments

Comments
 (0)