Skip to content

Commit dd2f8dc

Browse files
authored
Merge pull request #208 from gdsfactory/chore/enable-tbump
chore: enable tbump for releases
2 parents 8c4ae44 + 7d539fc commit dd2f8dc

3 files changed

Lines changed: 30 additions & 23 deletions

File tree

justfile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,13 @@ dev:
88
uvx pre-commit install
99
git config diff.ipynb.textconv "jupyter nbconvert --to script --stdout"
1010

11-
# Version bumping
12-
[linux,macos]
13-
bver:
14-
curl -LsSf https://github.com/flaport/bver/releases/latest/download/install.sh | sh
15-
16-
# Version bumping
17-
[windows]
18-
bver:
19-
powershell -ExecutionPolicy ByPass -c "irm https://github.com/flaport/bver/releases/latest/download/install.ps1 | iex"
11+
# Install the release versioning tool.
12+
tbump:
13+
uv tool install tbump
2014

2115
# bump version
22-
bump version="patch":
23-
bver bump "{{ version }}"
16+
bump version:
17+
tbump "{{ version }}"
2418

2519
uv:
2620
curl -LsSf https://astral.sh/uv/install.sh | sh

pyproject.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ test = [
6969
requires = ["build", "setuptools>=61", "uv", "wheel"]
7070
build-backend = "setuptools.build_meta"
7171

72-
[[tool.bver.file]]
73-
src = "README.md"
74-
75-
[[tool.bver.file]]
76-
src = "pyproject.toml"
77-
78-
[[tool.bver.file]]
79-
src = "src/gsim/__init__.py"
80-
81-
[tool.bver.git]
82-
commit-template = "Release {new-version}"
83-
8472
[tool.codespell]
8573
ignore-words-list = "doubleclick,euclidian,te"
8674

tbump.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[version]
2+
current = "0.2.0"
3+
regex = '''
4+
(?P<major>\d+)
5+
\.
6+
(?P<minor>\d+)
7+
\.
8+
(?P<patch>\d+)
9+
'''
10+
11+
[git]
12+
message_template = "Release {new_version}"
13+
tag_template = "{new_version}"
14+
15+
[[file]]
16+
src = "pyproject.toml"
17+
search = 'version = "{current_version}"'
18+
19+
[[file]]
20+
src = "README.md"
21+
search = "# gsim {current_version}"
22+
23+
[[file]]
24+
src = "src/gsim/__init__.py"
25+
search = '__version__ = "{current_version}"'

0 commit comments

Comments
 (0)