fix: Use leniency for semver parsing (#184)
This commit is contained in:
parent
e6905b4fcc
commit
abedf4fc6b
4 changed files with 46 additions and 3 deletions
|
|
@ -1,5 +1,4 @@
|
|||
use blue_build_utils::constants::IMAGE_VERSION_LABEL;
|
||||
use semver::Version;
|
||||
use serde::Deserialize;
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
|
|
@ -20,7 +19,7 @@ impl ImageMetadata {
|
|||
self.labels
|
||||
.get(IMAGE_VERSION_LABEL)?
|
||||
.as_str()
|
||||
.and_then(|v| Version::parse(v).ok())?
|
||||
.and_then(|v| lenient_semver::parse(v).ok())?
|
||||
.major,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue