Skip to content

Commit 09924ad

Browse files
authored
set up bump2version (#148)
1 parent 7bb7077 commit 09924ad

File tree

3 files changed

+37
-11
lines changed

3 files changed

+37
-11
lines changed

.bumpversion.cfg

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[bumpversion]
2+
current_version = 2.0.8-dev
3+
tag = False
4+
commit = True
5+
message = bump version: {current_version} -> {new_version}
6+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([-](?P<release>(dev|stable)+)(?P<build>\d*))?
7+
serialize =
8+
{major}.{minor}.{patch}-{release}{build}
9+
{major}.{minor}.{patch}-{release}
10+
{major}.{minor}.{patch}
11+
12+
[bumpversion:part:release]
13+
optional_value = stable
14+
values =
15+
dev
16+
stable
17+
18+
[bumpversion:file:setup.cfg]
19+
search = version = {current_version}
20+
replace = version = {new_version}
21+
22+
[bumpversion:file:docs/source/conf.py]
23+
search = release = "{current_version}"
24+
replace = release = "{new_version}"

.pre-commit-config.yaml

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
33
rev: v4.3.0
44
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
5+
- id: trailing-whitespace
6+
exclude: .bumpversion.cfg
7+
- id: end-of-file-fixer
78

8-
- repo: https://github.com/asottile/reorder_python_imports
9+
- repo: https://github.com/asottile/reorder_python_imports
910
rev: v3.8.2
1011
hooks:
11-
- id: reorder-python-imports
12+
- id: reorder-python-imports
1213
args: ["--py38-plus"]
1314

14-
- repo: https://github.com/asottile/add-trailing-comma
15+
- repo: https://github.com/asottile/add-trailing-comma
1516
rev: v2.2.3
1617
hooks:
17-
- id: add-trailing-comma
18+
- id: add-trailing-comma
1819

19-
- repo: https://github.com/asottile/pyupgrade
20+
- repo: https://github.com/asottile/pyupgrade
2021
rev: v2.37.3
2122
hooks:
22-
- id: pyupgrade
23+
- id: pyupgrade
2324

24-
- repo: https://github.com/psf/black
25+
- repo: https://github.com/psf/black
2526
rev: 22.8.0
2627
hooks:
27-
- id: black
28+
- id: black
2829
args: [--safe]

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ package_dir =
4545

4646
[options.extras_require]
4747
dev =
48+
bump2version==1.0.1
4849
mypy==0.971
4950
parameterized==0.8.1
5051
pre-commit==2.20.0

0 commit comments

Comments
 (0)