Skip to content

Commit

Permalink
Switch to bump-my-version (#818)
Browse files Browse the repository at this point in the history
* switch to bump-my-version

* match new pattern

* change bump-my-version cfg

* try without pre commit hooks

* swap dep

* updated release instructions
  • Loading branch information
Helveg committed Mar 18, 2024
1 parent 3701883 commit 54ad737
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 38 deletions.
34 changes: 0 additions & 34 deletions .bumpversion.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion bsb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
install the `bsb` package instead.
"""

__version__ = "4.0.0b9"
__version__ = "4.0.0-b10"

import ast
import functools
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Releases

To release a new version::

bump2version pre
bump-my-version bump pre_n
python -m build
twine upload dist/* --skip-existing
40 changes: 38 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,47 @@ dev = [
"black~=24.1.1",
"isort~=5.12",
"snakeviz~=2.1",
"bump2version~=1.0"
"bump-my-version~=0.18"
]

[tool.black]
line-length = 90

[tool.isort]
profile = "black"
profile = "black"

[tool.bumpversion]
current_version = "4.0.0-b10"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:
- # dash seperator for pre-release section
(?P<pre_l>[a-zA-Z-]+) # pre-release label
(?P<pre_n>0|[1-9]\\d*) # pre-release version number
)? # pre-release section is optional
"""
serialize = [
"{major}.{minor}.{patch}-{pre_l}{pre_n}",
"{major}.{minor}.{patch}",
]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
tag = true
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = "--no-verify"

[tool.bumpversion.parts.pre_l]
values = ["dev", "a", "b", "rc", "final"]
optional_value = "final"

[[tool.bumpversion.files]]
filename = "bsb/__init__.py"

0 comments on commit 54ad737

Please sign in to comment.