-
Notifications
You must be signed in to change notification settings - Fork 149
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
Store and allow retrieval of the string of the version in its original form #16
Comments
knqyf263
pushed a commit
to knqyf263/go-version
that referenced
this issue
Apr 14, 2019
Fixes hashicorp#16, hashicorp#27 This keeps track of the original version that was parsed and makes it available as `v.Original`. Additionally, I updated the String docs to note that the returned value is canonicalized according to some set of rules.
thaJeztah
added a commit
to thaJeztah/cli
that referenced
this issue
Oct 24, 2019
full diff: hashicorp/go-version@23480c0...v1.2.0 includes: - hashicorp/go-version#53 Implement GreaterThanOrEqual + LessThanOrEqual - hashicorp/go-version#45 Add new constructor that strictly adheres to semver specs - hashicorp/go-version#40 Support Original to return original version - fixes hashicorp/go-version#16 Store and allow retrieval of the string of the version in its original form - fixes hashicorp/go-version#27 Support for zero padded numbers (e.g. `17.03.0-ce`) - hashicorp/go-version#41 Segments64 makes a copy to match Segments - hashicorp/go-version#38 When using a specific pattern, unintended results are returned Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins
pushed a commit
to docker-archive/docker-ce
that referenced
this issue
Oct 29, 2019
full diff: hashicorp/go-version@23480c0...v1.2.0 includes: - hashicorp/go-version#53 Implement GreaterThanOrEqual + LessThanOrEqual - hashicorp/go-version#45 Add new constructor that strictly adheres to semver specs - hashicorp/go-version#40 Support Original to return original version - fixes hashicorp/go-version#16 Store and allow retrieval of the string of the version in its original form - fixes hashicorp/go-version#27 Support for zero padded numbers (e.g. `17.03.0-ce`) - hashicorp/go-version#41 Segments64 makes a copy to match Segments - hashicorp/go-version#38 When using a specific pattern, unintended results are returned Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 87cf5b606a07607b03b311085d5b66a0944ec53c Component: cli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For my use case (a little API that grabs a GitHub repository's tags and then matches semver patterns against it) it would be helpful if there were a way back to the string of the version in its original form.
https://api.mattandre.ws/semver/github/hashicorp/terraform/<v0.5
With one small tweak, this is very easy to achieve with your
go-version
library, see here:-matthew-andrews@401ade5
Could this (or something like it) be something you could consider merging into the proper library?
The text was updated successfully, but these errors were encountered: