Skip to content

Commit

Permalink
Merge pull request #2053 from effigies/chore/bumpversion
Browse files Browse the repository at this point in the history
chore(schematools): Add configuration for bump-my-version
  • Loading branch information
effigies authored Feb 20, 2025
2 parents 68dab54 + c12e5d8 commit 2cbdf82
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions tools/schemacode/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ markers = [
minversion = "6.0"
xfail_strict = true

[tool.coverage]

[tool.coverage.paths]
source = [
"src/bidsschematools",
Expand All @@ -112,10 +114,32 @@ source = [
[tool.coverage.run]
parallel = true

[tool.bumpver]
# Release process:
# cd tools/schemacode
# uvx bump-my-version bump pre_label --tag
# [inspect result]
# git push upstream <current-branch> --tags
# uvx bump-my-version bump <patch|minor|major>
# git push upstream <current-branch>
[tool.bumpversion]
current_version = "1.1.0-dev"
version_pattern = "MAJOR.MINOR.PATCH[-TAG]"
commit = false
parse = """(?x)
(?P<major>[0-9]+)
\\.(?P<minor>[0-9]+)
\\.(?P<patch>[0-9]+)
(?:-(?P<pre_label>dev))?
"""
serialize = ["{major}.{minor}.{patch}-{pre_label}", "{major}.{minor}.{patch}"]
commit = true
message = "chore: Bump schema package to {new_version}"
# Use --tag on releases
tag = false
tag_name = "schema-{new_version}"
tag_message = "Schema release {new_version}"

[tool.bumpversion.parts.pre_label]
values = ["dev", "final"]
optional_value = "final"

[tool.bumpver.file_patterns]
"src/bidsschematools/data/schema/SCHEMA_VERSION" = ['{version}']
[[tool.bumpversion.files]]
filename = "../../src/schema/SCHEMA_VERSION"

0 comments on commit 2cbdf82

Please sign in to comment.