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

Make release prefix configurable #76

Open
sunshowers opened this issue Sep 12, 2021 · 0 comments
Open

Make release prefix configurable #76

sunshowers opened this issue Sep 12, 2021 · 0 comments

Comments

@sunshowers
Copy link

Hi there! Thanks for writing self_update!

I'm playing around with it and I noticed that the release prefix is currently not configurable: https://docs.rs/self_update/0.27.0/src/self_update/backends/github.rs.html#55. Versions beginning with v are not valid semver, and using v is more of a convention than a hard rule. Other projects might use their own prefixes in their tag names (e.g. my-package-1.3.4, common in monorepo situations where multiple binaries are released), or no prefix at all (e.g. 1.3.4).

Moreover, if tag names begin with v but don't use the v1.3.4 naming scheme, they will have unexpected results. For example, if a tag is called very-cool-package-1.3.4, its version will be returned as ery-cool-package-1.3.4. This seems non-ideal.

My proposed solution would be to add a configuration, e.g. fn tag_prefix(&str). This can be "v" by default, but could also be set to "my-package-" or even "". You could then even filter out tags that don't match the prefix.

This would be a breaking change.

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

No branches or pull requests

1 participant