Support wildcards in 0.x versions
Fixes: https://pagure.io/fedora-rust/rust2rpm/issue/173 Signed-off-by: Igor Raits <igor.raits@gmail.com>
This commit is contained in:
parent
dc4dd1c6e0
commit
fbcb8d0d3e
2 changed files with 9 additions and 1 deletions
|
@ -128,7 +128,7 @@ class CargoSemVer:
|
|||
if kind == CargoSemVer.KIND_ANY:
|
||||
normalized.append((CargoSemVer.KIND_GTE,
|
||||
CargoSemVer.coerce(version)))
|
||||
if version.major:
|
||||
if version.major is not None:
|
||||
if version.minor is not None:
|
||||
upper_version = CargoSemVer.next_minor(version)
|
||||
else:
|
||||
|
|
8
test.py
8
test.py
|
@ -29,6 +29,14 @@ from rust2rpm.metadata import Version
|
|||
"(crate(test) >= 1.0.0 with crate(test) < 2.0.0~)"),
|
||||
("*",
|
||||
"crate(test) >= 0.0.0"),
|
||||
("0.*",
|
||||
"(crate(test) >= 0.0.0 with crate(test) < 1.0.0~)"),
|
||||
("0.0.*",
|
||||
"(crate(test) >= 0.0.0 with crate(test) < 0.1.0~)"),
|
||||
("0.1.*",
|
||||
"(crate(test) >= 0.1.0 with crate(test) < 0.2.0~)"),
|
||||
("0.*.*",
|
||||
"(crate(test) >= 0.0.0 with crate(test) < 1.0.0~)"),
|
||||
("1.*",
|
||||
"(crate(test) >= 1.0.0 with crate(test) < 2.0.0~)"),
|
||||
("1.2.*",
|
||||
|
|
Loading…
Reference in a new issue