mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix: semver parser grab everything before hyphen (#23140)
used for versions like 2.1.0-DEBUG
This commit is contained in:
parent
a70843e2b4
commit
efac8c6667
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ class SemVer {
|
||||||
}
|
}
|
||||||
|
|
||||||
factory SemVer.fromString(String version) {
|
factory SemVer.fromString(String version) {
|
||||||
final parts = version.split('.');
|
final parts = version.split("-")[0].split('.');
|
||||||
return SemVer(major: int.parse(parts[0]), minor: int.parse(parts[1]), patch: int.parse(parts[2]));
|
return SemVer(major: int.parse(parts[0]), minor: int.parse(parts[1]), patch: int.parse(parts[2]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue