MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / bump

Method bump

commitizen/version_schemes.py:121–140  ·  view source on GitHub ↗

Based on the given increment, generate the next bumped version according to the version scheme Args: increment: The component to increase prerelease: The type of prerelease, if Any is_local_version: Whether to increment the local version instead

(
        self,
        increment: Increment | None,
        prerelease: Prerelease | None = None,
        prerelease_offset: int = 0,
        devrelease: int | None = None,
        is_local_version: bool = False,
        build_metadata: str | None = None,
        exact_increment: bool = False,
    )

Source from the content-addressed store, hash-verified

119 raise NotImplementedError("must be implemented")
120
121 def bump(
122 self,
123 increment: Increment | None,
124 prerelease: Prerelease | None = None,
125 prerelease_offset: int = 0,
126 devrelease: int | None = None,
127 is_local_version: bool = False,
128 build_metadata: str | None = None,
129 exact_increment: bool = False,
130 ) -> Self:
131 """
132 Based on the given increment, generate the next bumped version according to the version scheme
133
134 Args:
135 increment: The component to increase
136 prerelease: The type of prerelease, if Any
137 is_local_version: Whether to increment the local version instead
138 exact_increment: Treat the increment and prerelease arguments explicitly. Disables logic
139 that attempts to deduce the correct increment when a prerelease suffix is present.
140 """
141
142
143# With PEP 440 and SemVer semantics, a scheme is the class; a version is an instance.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected