chore: bump dependencies
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ic1fda520473e53d1a584a3dda63ffda86a6a6964
This commit is contained in:
parent
fa5befff3b
commit
4fc05e71e7
5 changed files with 362 additions and 94 deletions
|
|
@ -192,15 +192,29 @@ impl Project {
|
|||
return true;
|
||||
}
|
||||
|
||||
// Check if all providers have the same latest file name
|
||||
// (simplified check - in reality would compare semantic versions)
|
||||
let file_names: Vec<_> = versions_by_provider
|
||||
// Compare semantic versions extracted from file names
|
||||
let parse_version = |name: &str| {
|
||||
// Try to extract version from patterns like "mod-1.0.0.jar" or
|
||||
// "mod_v1.0.0"
|
||||
let version_str = name
|
||||
.rsplit_once('-')
|
||||
.and_then(|(_, v)| v.strip_suffix("jar"))
|
||||
.or_else(|| {
|
||||
name
|
||||
.rsplit_once('_')
|
||||
.and_then(|(_, v)| v.strip_suffix("jar"))
|
||||
})
|
||||
.unwrap_or(name);
|
||||
semver::Version::parse(version_str).ok()
|
||||
};
|
||||
|
||||
let versions: Vec<_> = versions_by_provider
|
||||
.values()
|
||||
.filter_map(|files| files.first().copied())
|
||||
.filter_map(|files| files.first().copied().and_then(parse_version))
|
||||
.collect();
|
||||
|
||||
// All file names should be the same for versions to match
|
||||
file_names.windows(2).all(|w| w[0] == w[1])
|
||||
// All versions should be the same
|
||||
versions.windows(2).all(|w| w[0] == w[1])
|
||||
}
|
||||
|
||||
/// Check if versions do NOT match across providers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue