Open reitzmichnicht opened 1 year ago
Could you give some examples of invalid prerelease values?
We are experiencing exactly the same problem (also with npm). For us the problem are underscores _
inside of the branch name (slug), npm will refuse these versions:
Version: {describe.tag.version}-${ref}.${describe.distance}
feature/i_did_a_thing
-> 1.0.0-feature-i_did_a_thing.99
should be 1.0.0-feature-i-did-a-thing.99
Would it make sense to you to have an option to set the slug characters?
Yes it would!
Hi
Best extension ever, but I stumpled upon some incompatibilities with some other ecosystems. We are using this extension to determine the version of maven projects from the branch name. Sadly its mostly not possible to restrict the branch naming itself, and we use the branch name as the prerelease part for semantic versioning. https://semver.org/spec/v2.0.0.html#backusnaur-form-grammar-for-valid-semver-versions
Semantic versioning fails if the branch name contains characters not allowed for the prerelease part. Maven itself does not care about it, but when reusing the same generated version for e.g. npm parts of the project it fails. So it would be great to have an option to make some variables compatible to be used as prerelease or build part of the semver string.
Kind regards, Michael