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

Not equal expression with wildcards !=1.0.x checks failure #80

Open
ByteF1sh opened this issue Aug 28, 2024 · 2 comments
Open

Not equal expression with wildcards !=1.0.x checks failure #80

ByteF1sh opened this issue Aug 28, 2024 · 2 comments

Comments

@ByteF1sh
Copy link

ByteF1sh commented Aug 28, 2024

hi, i want to exclude all the versions in 1.1.x and set a range like this "!=1.1.x",but all the versions are checked failure.
Here's the test code.

import (
	"github.com/blang/semver/v4"
	"testing"
)

func TestV(t *testing.T) {
	versionRange := "!=1.0.x"
	expectedRange, err := semver.ParseRange(versionRange)
	if err != nil { //wrong range exp
		t.Fail()
	}
	v, _ := semver.Parse("1.1.1")
	if !expectedRange(v) { // expectedRange(v) == false,want true but got false
		t.Fail()
	}
}

I noticed that this range will expand to <1.1.0 and >=1.2.0 ,and it should link with OR but not AND .
Is there any plan to fix it ?

@mamachanko
Copy link

mamachanko commented Aug 29, 2024

This repository is unmaintained. I think your options are to fork+fix or use another module like masterminds/semver. Alternatively, you may get some response on the fork of blang/semver we maintain in carvel-dev/semver.

@ByteF1sh
Copy link
Author

This repository is unmaintained. I think your options are to fork+fix or use another module like masterminds/semver. Alternatively, you may get some response on the fork of blang/semver we maintain in carvel-dev/semver.

it works,thx a lot

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