fledge
fledge copied to clipboard
pre_release() should be smart about version numbers
0.x.99.9yyy -> 0.(x+1).0 x.99.99.9yyy -> (x+1).0.0
We also might want new modes for bump_version()
: "pre-minor"
-> x.y.99.9000, "pre-major"
-> x.99.99.9000
This is likely a duplicate.
It's related to #341 (but not a duplicate of it).
Yeah, let's do the manual route first. It seems useful for automation too.
If we keep that automated use case in mind during development -- my vision is that bumping the "dev"
version would use "pre-minor"
or "pre-major"
if there is a feature or breaking change in the list.
Noting that I did not identify any duplicate of this issue.
As the smart behavior will depend on the version decomposition that will be introduced in #412 (here we will need the components to be numeric)
0.x.99.9yyy -> 0.(x+1). x.99.99.9yyy -> (x+1).0.0
Meaning (in pseudo code), in a function called from pre-release that would return the which if not provided by the user,
# could the dev component simply exist, does it need to start with 9
if !(components[dev] starts with 9 && components[patch]==99) {
# normal behavior
return("patch")
# or error? probably not error
}
if (components[major] == 99 {
"major"
} else {
"minor"
}
Perhaps:
if minor == 99: major else if patch == 99: minor else: patch
ah yes that is simpler. :smile_cat:
I'll get to this after #412 is merged.
Does "next" we added in #524 cover this?
Yes, thanks.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.