Optum / semver-cli

Apache License 2.0
8 stars 1 forks source link

support setting prerelease number #6

Closed justinmchase closed 1 year ago

justinmchase commented 1 year ago

Proposed changes

This adds the ability to set the prerelease number specifically during a get or inc command. If not specified it will attempt to increment the prerelease number or set it to the default 0 but if you now specify --value $N then it will specifically set it to N

For example if your current version is 1.2.3, the following behaviors are expected when incrementing now:

args incremented version
1.2.3
--pre 1.2.3-pre.0
--pre --name alpha 1.2.3-alpha.0
--pre --name alpha --value 11 1.2.3-alpha.11

Types of changes

Additive, non-breaking feature. minor increment.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.