8000 fix(bump): add bump support with custom type + scope + exclamation mark · sacha-c/commitizen@8f19b24 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f19b24

Browse files
jmattheisLee-W
authored andcommitted
fix(bump): add bump support with custom type + scope + exclamation mark
The regex didn't match the following commit with exclamation mark, and therefore didn't update the version. chore(deps)!: drop support for Python 3.9 The regex was simplified, because a lot groups were not needed.
1 parent 8cf6ded commit 8f19b24

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

commitizen/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Settings(TypedDict, total=False):
104104
MINOR = "MINOR"
105105
PATCH = "PATCH"
106106

107-
bump_pattern = r"^(((BREAKING[\-\ ]CHANGE|feat|fix|refactor|perf)(\(.+\))?(!)?)|\w+!):"
107+
bump_pattern = r"^((BREAKING[\-\ ]CHANGE|\w+)(\(.+\))?!?):"
108108
bump_map = OrderedDict(
109109
(
110110
(r"^.+!$", MAJOR),

tests/test_bump_find_increment.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
"fix(setup.py): future is now required for every python version",
5959
]
6060

61+
MAJOR_INCREMENTS_EXCLAMATION_OTHER_TYPE_WITH_SCOPE_CC = [
62+
"chore(deps)!: drop support for Python 3.9",
63+
"docs(README): motivation",
64+
"fix(setup.py): future is now required for every python version",
65+
]
66+
6167
PATCH_INCREMENTS_SVE = ["readme motivation PATCH", "fix setup.py PATCH"]
6268

6369
MINOR_INCREMENTS_SVE = [
@@ -85,6 +91,7 @@
8591
(MAJOR_INCREMENTS_BREAKING_CHANGE_CC, "MAJOR"),
8692
(MAJOR_INCREMENTS_BREAKING_CHANGE_ALT_CC, "MAJOR"),
8793
(MAJOR_INCREMENTS_EXCLAMATION_OTHER_TYPE_CC, "MAJOR"),
94+
(MAJOR_INCREMENTS_EXCLAMATION_OTHER_TYPE_WITH_SCOPE_CC, "MAJOR"),
8895
(MAJOR_INCREMENTS_EXCLAMATION_CC, "MAJOR"),
8996
(MAJOR_INCREMENTS_EXCLAMATION_CC_SAMPLE_2, "MAJOR"),
9097
(NONE_INCREMENT_CC, None),

0 commit comments

Comments
 (0)
0