Skip to content

Commit fe3b726

Browse files
carlossgLee-W
authored andcommitted
fix(bump): add debugging to bump
command
1 parent 6920303 commit fe3b726

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: commitizen/bump.py

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import re
55
from collections import OrderedDict
66
from glob import iglob
7+
from logging import getLogger
78
from string import Template
89
from typing import cast
910

@@ -14,6 +15,8 @@
1415

1516
VERSION_TYPES = [None, PATCH, MINOR, MAJOR]
1617

18+
logger = getLogger("commitizen")
19+
1720

1821
def find_increment(
1922
commits: list[GitCommit], regex: str, increments_map: dict | OrderedDict
@@ -38,7 +41,15 @@ def find_increment(
3841
new_increment = increments_map[match_pattern]
3942
break
4043

44+
if new_increment is None:
45+
logger.debug(
46+
f"no increment needed for '{found_keyword}' in '{message}'"
47+
)
48+
4149
if VERSION_TYPES.index(increment) < VERSION_TYPES.index(new_increment):
50+
logger.debug(
51+
f"increment detected is '{new_increment}' due to '{found_keyword}' in '{message}'"
52+
)
4253
increment = new_increment
4354

4455
if increment == MAJOR:

0 commit comments

Comments
 (0)