|
@@ -177,6 +177,8 @@ pub fn build(config: &CrateConfig) -> Result<()> {
|
|
pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> {
|
|
pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> {
|
|
log::info!("🚅 Running build [Desktop] command...");
|
|
log::info!("🚅 Running build [Desktop] command...");
|
|
|
|
|
|
|
|
+ let ignore_files = build_assets(config)?;
|
|
|
|
+
|
|
let mut cmd = Command::new("cargo");
|
|
let mut cmd = Command::new("cargo");
|
|
cmd.current_dir(&config.crate_dir)
|
|
cmd.current_dir(&config.crate_dir)
|
|
.arg("build")
|
|
.arg("build")
|
|
@@ -261,6 +263,13 @@ pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> {
|
|
log::warn!("Error copying dir: {}", e);
|
|
log::warn!("Error copying dir: {}", e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ for ignore in &ignore_files {
|
|
|
|
+ let ignore = ignore.strip_prefix(&config.asset_dir).unwrap();
|
|
|
|
+ let ignore = config.out_dir.join(ignore);
|
|
|
|
+ if ignore.is_file() {
|
|
|
|
+ std::fs::remove_file(ignore)?;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|