Skip to content

Commit 442b496

Browse files
committed
build: Add bumpversion support
Add the ability to bump release numbers with "tox -e bumpversion -- patch" etc.
1 parent be09082 commit 442b496

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.bumpversion.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[bumpversion]
2+
commit = True
3+
current_version = 0.0.0
4+
message = build: Version {new_version}
5+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(rc(?P<rc>\d+))?
6+
serialize = {major}.{minor}.{patch}
7+
tag = True
8+
9+
[bumpversion:file:README.md]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This package provides no functionality of its own; it only installs dependencies
1313
To install directly from this repository, run:
1414

1515
```shell
16-
pip install git+https://github.com/cleura/cleura-openstack
16+
pip install git+https://github.com/cleura/cleura-openstack@v0.0.0
1717
```
1818

1919
Then, invoke the `openstack` command provided by the `python-openstackclient` package.

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ yamllint = [
3838
markdownlint = [
3939
"pymarkdownlnt",
4040
]
41+
bumpversion = [
42+
"bump2version",
43+
]
4144

4245

4346
[tool.tox]
@@ -73,6 +76,14 @@ dependency_groups = [
7376
"markdownlint",
7477
]
7578

79+
[tool.tox.env.bumpversion]
80+
skip_install = true
81+
description = "Increment the major, minor, or patch version indicator"
82+
commands = [["bump2version", "{posargs}"]]
83+
dependency_groups = [
84+
"bumpversion",
85+
]
86+
7687
[tool.flake8]
7788
max-line-length = 180
7889
statistics = true

0 commit comments

Comments
 (0)