mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-26 20:00:32 +00:00
Clean target folders in examples (#4191)
This commit is contained in:
parent
d839133575
commit
cae93b8427
@ -231,9 +231,13 @@ fn clean(workspace: &Path, args: CleanArgs) -> Result<()> {
|
||||
packages.sort();
|
||||
|
||||
for package in packages {
|
||||
log::info!("Cleaning package: {}", package);
|
||||
let path = workspace.join(package.to_string());
|
||||
|
||||
for dir in walkdir::WalkDir::new(path) {
|
||||
if let Ok(dir) = dir
|
||||
&& let path = dir.path()
|
||||
&& path.join("Cargo.toml").exists()
|
||||
{
|
||||
log::info!("Cleaning folder: {}", path.display());
|
||||
let cargo_args = CargoArgsBuilder::default()
|
||||
.subcommand("clean")
|
||||
.arg("--target-dir")
|
||||
@ -247,6 +251,8 @@ fn clean(workspace: &Path, args: CleanArgs) -> Result<()> {
|
||||
)
|
||||
})?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user