Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support valid semver versions #246

Open
reitzmichnicht opened this issue Apr 3, 2023 · 4 comments
Open

Support valid semver versions #246

reitzmichnicht opened this issue Apr 3, 2023 · 4 comments
Assignees

Comments

@reitzmichnicht
Copy link
Contributor

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

@qoomon
Copy link
Owner

qoomon commented Apr 3, 2023

Could you give some examples of invalid prerelease values?

@qoomon qoomon self-assigned this Apr 3, 2023
@jstsddg
Copy link

jstsddg commented Jun 2, 2023

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

@qoomon
Copy link
Owner

qoomon commented Sep 28, 2023

Would it make sense to you to have an option to set the slug characters?

@frans-otogone
Copy link

Yes it would!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants