Skip to content

Commit d32f625

Browse files
committed
Add bump-my-version config¨
1 parent 852a1d8 commit d32f625

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors:
88
given-names: "Hew"
99
orcid: "https://orcid.org/0000-0000-0000-0000"
1010
title: "My Research Software"
11-
version: 2.0.4
11+
version: 1.1.0
1212
doi: 10.5281/zenodo.1234
1313
date-released: 2017-12-18
1414
url: "https://github.com/scientificcomputing/example-paper"

pyproject.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ dependencies = [
1717
[project.optional-dependencies]
1818
dev = [
1919
"pdbpp",
20+
"bump-my-version",
2021
"pre-commit",
2122
]
2223
docs = [
@@ -70,3 +71,28 @@ target-version = "py310"
7071
[tool.ruff.mccabe]
7172
# Unlike Flake8, default to a complexity level of 10.
7273
max-complexity = 10
74+
75+
76+
[tool.bumpversion]
77+
allow_dirty = false
78+
commit = true
79+
message = "Bump version: {current_version} → {new_version}"
80+
tag = true
81+
sign_tags = false
82+
tag_name = "v{new_version}"
83+
tag_message = "Bump version: {current_version} → {new_version}"
84+
current_version = "0.2.0"
85+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
86+
serialize = [
87+
"{major}.{minor}.{patch}"
88+
]
89+
90+
[[tool.bumpversion.files]]
91+
filename = "pyproject.toml"
92+
search = 'version = "{current_version}"'
93+
replace = 'version = "{new_version}"'
94+
95+
[[tool.bumpversion.files]]
96+
filename = "CITATION.cff"
97+
search = "version: {current_version}"
98+
replace = "version: {new_version}"

0 commit comments

Comments
 (0)