File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,24 @@ def style(self):
93
93
94
94
@cached_property
95
95
def bump_rule (self ) -> BumpRule :
96
+ """Get the bump rule for version incrementing.
97
+
98
+ This property returns a BumpRule instance that determines how version numbers
99
+ should be incremented based on commit messages. It first checks if a custom
100
+ bump rule was set via `_bump_rule`. If not, it falls back to creating a
101
+ CustomBumpRule using the class's bump pattern and maps.
102
+
103
+ The CustomBumpRule requires three components to be defined:
104
+ - bump_pattern: A regex pattern to match commit messages
105
+ - bump_map: A mapping of commit types to version increments
106
+ - bump_map_major_version_zero: A mapping for version increments when major version is 0
107
+
108
+ Returns:
109
+ BumpRule: A rule instance that determines version increments
110
+
111
+ Raises:
112
+ NoPatternMapError: If the required bump pattern or maps are not defined
113
+ """
96
114
if self ._bump_rule :
97
115
return self ._bump_rule
98
116
You can’t perform that action at this time.
0 commit comments