Refresh every stale post route during validation.

This commit is contained in:
2026-08-15 10:23:10 +02:00
parent 58596c8de0
commit 1f03d91c5f
9 changed files with 149 additions and 75 deletions

View File

@@ -82,15 +82,14 @@ fn prepare_macos_x64_runtime_from_archive(
for entry in archive.entries()? {
let mut entry = entry?;
let path = entry.path()?;
let destination = if path.ends_with(format!(
"lib/libonnxruntime.{MACOS_X64_ORT_VERSION}.dylib"
)) {
Some(format!("libonnxruntime.{MACOS_X64_ORT_VERSION}.dylib"))
} else if path.ends_with("LICENSE") {
Some("ONNXRuntime-LICENSE.txt".to_owned())
} else {
None
};
let destination =
if path.ends_with(format!("lib/libonnxruntime.{MACOS_X64_ORT_VERSION}.dylib")) {
Some(format!("libonnxruntime.{MACOS_X64_ORT_VERSION}.dylib"))
} else if path.ends_with("LICENSE") {
Some("ONNXRuntime-LICENSE.txt".to_owned())
} else {
None
};
if let Some(destination) = destination {
io::copy(&mut entry, &mut File::create(directory.join(destination))?)?;
}
@@ -335,9 +334,7 @@ fn runtime_files(
.filter_map(|name| name.into_string().ok())
.filter(|name| name.starts_with("libonnxruntime") && name.contains(".dylib"))
.collect::<Vec<_>>();
let has_versioned = names
.iter()
.any(|name| name != "libonnxruntime.dylib");
let has_versioned = names.iter().any(|name| name != "libonnxruntime.dylib");
if has_versioned {
names.retain(|name| name != "libonnxruntime.dylib");
}