Skip to content

Commit

Permalink
refactor: incorporate PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jenstroeger committed Nov 12, 2023
1 parent 8522b8c commit 9da9302
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions commitizen/commands/bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ def __call__(self): # noqa: C901
if last_final is not None:
commits = git.get_commits(last_final)
increment = self.find_increment(commits)
semver = last_final.increment_base(
base = last_final.increment_base(
increment=increment, force_bump=True
)
if semver != current_version.base_version:
if base != current_version.base_version:
force_bump = True
elif prerelease:
increment = None
Expand Down
4 changes: 2 additions & 2 deletions commitizen/version_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def bump(
release = list(self.release)
if len(release) < 3:
release += [0] * (3 - len(release))
current_semver = ".".join(str(part) for part in release)
if base == current_semver:
current_base = ".".join(str(part) for part in release)
if base == current_base:
pre_version = self.generate_prerelease(
prerelease, offset=prerelease_offset
)
Expand Down

0 comments on commit 9da9302

Please sign in to comment.