Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cd7e3dd

Browse files
authored
Merge pull request #567 from Kurt-von-Laven/version-files
fix(bump): Support regexes containing colons
2 parents 2110a14 + f093717 commit cd7e3dd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

‎commitizen/bump.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ def update_version_in_files(
141141
"""
142142
# TODO: separate check step and write step
143143
for location in files:
144-
filepath, *regexes = location.split(":")
145-
regex = regexes[0] if regexes else None
144+
filepath, _, regex = location.partition(":")
146145

147146
with open(filepath, "r") as f:
148147
version_file = f.read()

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ tag_format = "v$version"
44
version_files = [
55
"pyproject.toml:version",
66
"commitizen/__version__.py",
7-
".pre-commit-config.yaml:rev.\\s+(?=[^\\n]+Commitizen)"
7+
".pre-commit-config.yaml:rev:.\\s+(?=[^\\n]+Commitizen)"
88
]
99

1010
[tool.black]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /