Skip to content

refactor(bump): delegate single-module bumps to operations.BumpOperation#227

Merged
indaco merged 1 commit intomainfrom
fix/unify-bump-logic
Mar 10, 2026
Merged

refactor(bump): delegate single-module bumps to operations.BumpOperation#227
indaco merged 1 commit intomainfrom
fix/unify-bump-logic

Conversation

@indaco
Copy link
Copy Markdown
Owner

@indaco indaco commented Mar 10, 2026

Description

Unify the dual bump logic paths. Single-module bumps now delegate to operations.BumpOperation instead of maintaining separate version in commands/bump/common.go.

This removes the versionCalculator type, makePatchCalculator/makeMinorCalculator/makeMajorCalculator, and duplicate extractPreReleaseBase, consolidating all bump logic through the operations package.

Related Issue

  • None

Notes for Reviewers

  • BumpResult struct with Preview() and Write() added to operations.BumpOperation
  • ExtractPreReleaseBase exported from semver/manager.go as the canonical location
  • pre.go and release.go simplified by delegating to the unified path

Unify version bump logic so single-module and multi-module paths
share the same BumpOperation implementation.
@indaco indaco merged commit ac0fdb3 into main Mar 10, 2026
7 checks passed
@indaco indaco deleted the fix/unify-bump-logic branch March 10, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant