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

Range to verify it's a "SNAPSHOT" Version #79

Open
niondir opened this issue Jul 17, 2024 · 1 comment
Open

Range to verify it's a "SNAPSHOT" Version #79

niondir opened this issue Jul 17, 2024 · 1 comment

Comments

@niondir
Copy link

niondir commented Jul 17, 2024

Hi,

I have a Version like this:

semver.MustParse("2.0.5-SNAPSHOT+a9b5fb82")

Now I want to define a "range" that accepts any Version containing "SNAPSHOT" anywhere.

e.g.

range = semver.MustParseRange("???")

range(semver.MustParse("2.0.5-SNAPSHOT+a9b5fb82")) //  == true
range(semver.MustParser(2.0.5))  //  == false

Is there already something to reflect that case? Or is anything planned?

@mamachanko
Copy link

Probably nothing is "planned" because this repo has seen its last change ~4y ago.

As for limiting a range by pre-release identifier, see what vendir did: https://github.com/carvel-dev/vendir/blob/1ccbd2548aa3656996c3c5b070ae7cf8153abacd/pkg/vendir/cmd/sort_semver.go#L38

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

2 participants