mirror of
https://github.com/lune-org/lune.git
synced 2025-04-08 04:20:54 +01:00
refactor: remove 'bin' extension for precompiled targets
This commit is contained in:
parent
971eccf12b
commit
4f80e98b8a
1 changed files with 3 additions and 11 deletions
|
@ -136,7 +136,7 @@ async fn get_base_exe_path(
|
||||||
if let Some(target_inner) = target {
|
if let Some(target_inner) = target {
|
||||||
let target_exe_extension = match target_inner.as_str() {
|
let target_exe_extension = match target_inner.as_str() {
|
||||||
"windows-x86_64" => "exe",
|
"windows-x86_64" => "exe",
|
||||||
_ => "bin",
|
_ => "",
|
||||||
};
|
};
|
||||||
|
|
||||||
let path = TARGET_BASE_DIR.join(format!("lune-{target_inner}.{target_exe_extension}"));
|
let path = TARGET_BASE_DIR.join(format!("lune-{target_inner}.{target_exe_extension}"));
|
||||||
|
@ -155,15 +155,7 @@ async fn get_base_exe_path(
|
||||||
cache_target(target_inner, target_exe_extension, &path).await?;
|
cache_target(target_inner, target_exe_extension, &path).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok((
|
Ok((true, path, output_path.with_extension(target_exe_extension)))
|
||||||
true,
|
|
||||||
path,
|
|
||||||
output_path.with_extension(if target_exe_extension == "bin" {
|
|
||||||
""
|
|
||||||
} else {
|
|
||||||
target_exe_extension
|
|
||||||
}),
|
|
||||||
))
|
|
||||||
} else {
|
} else {
|
||||||
Ok((false, PathBuf::new(), output_path))
|
Ok((false, PathBuf::new(), output_path))
|
||||||
}
|
}
|
||||||
|
@ -184,7 +176,7 @@ async fn cache_target(
|
||||||
.split('/')
|
.split('/')
|
||||||
.last()
|
.last()
|
||||||
.unwrap_or("lune-UNKNOWN-UNKNOWN")
|
.unwrap_or("lune-UNKNOWN-UNKNOWN")
|
||||||
.replace("zip", target_exe_extension);
|
.replace(".zip", format!(".{target_exe_extension}").as_str());
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"{} target {}",
|
"{} target {}",
|
||||||
|
|
Loading…
Add table
Reference in a new issue