MCPcopy Index your code
hub / github.com/commitizen-tools/commitizen / increment_base

Method increment_base

commitizen/version_schemes.py:215–230  ·  view source on GitHub ↗
(self, increment: Increment | None = None)

Source from the content-addressed store, hash-verified

213 return f"+{build_metadata}"
214
215 def increment_base(self, increment: Increment | None = None) -> str:
216 prev_release = list(self.release)
217 increments = [MAJOR, MINOR, PATCH]
218 base = dict(zip_longest(increments, prev_release, fillvalue=0))
219
220 if increment == MAJOR:
221 base[MAJOR] += 1
222 base[MINOR] = 0
223 base[PATCH] = 0
224 elif increment == MINOR:
225 base[MINOR] += 1
226 base[PATCH] = 0
227 elif increment == PATCH:
228 base[PATCH] += 1
229
230 return f"{base[MAJOR]}.{base[MINOR]}.{base[PATCH]}"
231
232 def bump(
233 self,

Callers 1

_get_increment_baseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected