mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-09-20 14:21:58 +00:00
Use to identify cargo build artifact if present (#1344)
This commit is contained in:
parent
bdfb3b6285
commit
1ab5a03aef
1 changed files with 8 additions and 5 deletions
|
@ -93,18 +93,21 @@ pub fn build(config: &CrateConfig, quiet: bool) -> Result<BuildResult> {
|
||||||
// [2] Establish the output directory structure
|
// [2] Establish the output directory structure
|
||||||
let bindgen_outdir = out_dir.join("assets").join("dioxus");
|
let bindgen_outdir = out_dir.join("assets").join("dioxus");
|
||||||
|
|
||||||
let release_type = match config.release {
|
let build_profile = if config.custom_profile.is_some() {
|
||||||
true => "release",
|
config.custom_profile.as_ref().unwrap()
|
||||||
false => "debug",
|
} else if config.release {
|
||||||
|
"release"
|
||||||
|
} else {
|
||||||
|
"debug"
|
||||||
};
|
};
|
||||||
|
|
||||||
let input_path = match executable {
|
let input_path = match executable {
|
||||||
ExecutableType::Binary(name) | ExecutableType::Lib(name) => target_dir
|
ExecutableType::Binary(name) | ExecutableType::Lib(name) => target_dir
|
||||||
.join(format!("wasm32-unknown-unknown/{}", release_type))
|
.join(format!("wasm32-unknown-unknown/{}", build_profile))
|
||||||
.join(format!("{}.wasm", name)),
|
.join(format!("{}.wasm", name)),
|
||||||
|
|
||||||
ExecutableType::Example(name) => target_dir
|
ExecutableType::Example(name) => target_dir
|
||||||
.join(format!("wasm32-unknown-unknown/{}/examples", release_type))
|
.join(format!("wasm32-unknown-unknown/{}/examples", build_profile))
|
||||||
.join(format!("{}.wasm", name)),
|
.join(format!("{}.wasm", name)),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue