Refresh every stale post route during validation.
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user