feat: support configuring the initial prerelease number - #2867
Open
ayloncarrijo wants to merge 1 commit into
Open
feat: support configuring the initial prerelease number#2867ayloncarrijo wants to merge 1 commit into
ayloncarrijo wants to merge 1 commit into
Conversation
Allow configuring the starting number for the first generated prerelease (e.g. 1.0.0-alpha.1 instead of 1.0.0-alpha), with subsequent bumps continuing from that value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow configuring the starting number for the first generated prerelease (e.g. 1.0.0-alpha.1 instead of 1.0.0-alpha), with subsequent bumps continuing from that value.
Fixes #2467
Problem
Today, the only way to get a numbered first prerelease is to work around it by manually setting
"prerelease-type": "alpha.1"(or similar). This is a hack:prerelease-type, which is meant to hold a simple identifier likealphaorbeta, not a pre-baked version fragment.Solution
Add a new
prerelease-initial-numberconfig option (CLI flag, manifest/config JSON, and JSON schema) that lets users explicitly set the starting number for the first prerelease:1.0.0-alpha.prerelease-initial-number: 1: first prerelease is1.0.0-alpha.1.prerelease-initial-number: 0: first prerelease is1.0.0-alpha.0, continuing asalpha.1,alpha.2, ...Only the "first transition into a prerelease" logic in
PrereleaseVersioningStrategychanges. Subsequent bumps already increment any numeric suffix via existing logic.