feat: add profile flag

This commit is contained in:
YuKun Liu 2022-06-06 08:46:16 +08:00
parent 51639af482
commit 6aa609144d

View file

@ -51,7 +51,8 @@ pub fn build(config: &CrateConfig) -> Result<()> {
if config.custom_profile.is_some() {
let custom_profile = config.custom_profile.as_ref().unwrap();
cmd.arg(format!("--profile {}", custom_profile));
cmd.arg("--profile");
cmd.arg(custom_profile);
}
match executable {
@ -194,6 +195,12 @@ pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> {
cmd.arg("--release");
}
if config.custom_profile.is_some() {
let custom_profile = config.custom_profile.as_ref().unwrap();
cmd.arg("--profile");
cmd.arg(custom_profile);
}
match &config.executable {
crate::ExecutableType::Binary(name) => cmd.arg("--bin").arg(name),
crate::ExecutableType::Lib(name) => cmd.arg("--lib").arg(name),