Closed bsolomon1124 closed 3 years ago
Left a similar question with some scheme modifications on Stack Overflow: https://stackoverflow.com/q/65083808/7954504.
Please see my answer on StackOverflow.
Since pre
and post
each have both a string prefix and a number, I believe it is necessary to split them accordingly. For example, the pre
part could be split into a prekind
(the string) and a pre
(the number). Then, the nice thing is that you can increment prekind
('dev'
to 'alpha'
to 'beta'
etc.) independently of the issue number (a sequence, as usual).
On the answer linked above, I've put both a complete configuration and an example with a number of invocations in sequence to show the various mutations that are possible.
Closing as the linked answer seems to be a full-fledged working solution.
We follow a versioning scheme that is mostly PEP 440 with some tweaks:
.dev0
is required, not.dev
major.minor.patch
required to be explicitIt comes down to 4 'groups' of versions as shown below:
Regex example: https://regex101.com/r/wupvcm/1
Reproducible single-file project:
Now we run:
Actual result:
Expected result:
What would be the proper invocation or configuration to (1) remove the
.postX
while (2) bumping thepre
segment from a2 to a3?