Skip to content

Add fixedMajorVersion option for multiple major version support#296

Open
Konboi wants to merge 1 commit intoSongmu:mainfrom
Konboi:multiple-major-version
Open

Add fixedMajorVersion option for multiple major version support#296
Konboi wants to merge 1 commit intoSongmu:mainfrom
Konboi:multiple-major-version

Conversation

@Konboi
Copy link

@Konboi Konboi commented Jan 29, 2026

Summary

Add tagpr.fixedMajorVersion configuration option that allows tagpr to target a specific major version when creating releases. This enables maintaining multiple major versions on different branches.

Closes #248

Use case:

  • v1 branch for v1.x.x releases
  • main branch for v2.x.x releases

Changes

  • Add tagpr.fixedMajorVersion config option (also via TAGPR_FIXED_MAJOR_VERSION env)
  • Accept both numeric ("1") and v-prefixed ("v1") formats
  • Filter tags in latestSemverTag() to only consider matching major versions
  • Validation error on invalid values during config reload

Example Usage

[tagpr]
    releaseBranch = v1
    fixedMajorVersion = 1

Or via environment variable:

TAGPR_FIXED_MAJOR_VERSION=1

Discussion Points

  • Currently only supports major version fixing. Minor version fixing (e.g., for LTS support like v1.0.x) is not implemented as the use case seems rare. Open to discussion if needed.
  • If we want to support minor version fixing in the future, we could rename and generalize to fixedVersion with pattern support:
    • fixedVersion = "1" → fix major version (v1.x.x)
    • fixedVersion = "1.2" → fix major and minor version (v1.2.x)

🤖 Generated with Claude Code

Add `tagpr.fixedMajorVersion` configuration option that allows tagpr to
target a specific major version when creating releases. This enables
maintaining multiple major versions on different branches (e.g., v1
branch for v1.x.x releases, main branch for v2.x.x releases).

- Add `tagpr.fixedMajorVersion` config option (also via TAGPR_FIXED_MAJOR_VERSION env)
- Accept both numeric ("1") and v-prefixed ("v1") formats
- Filter tags in latestSemverTag() to only consider matching major versions
- Add tests for FixedMajorVersion()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Konboi Konboi force-pushed the multiple-major-version branch from ba34272 to 77f1f60 Compare February 2, 2026 01:39
@Konboi
Copy link
Author

Konboi commented Feb 2, 2026

@Songmu I've fixed conflict. Could you review when you have time?
Thank you!

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.

Feature Request: Multi Version Support.

1 participant