mirror of
https://github.com/Swatinem/rust-cache
synced 2026-03-19 14:53:12 +00:00
fix: include target names in build/ and .fingerprint/ cleanup (#317)
This commit is contained in:
parent
d7ac6f694d
commit
bc1860267c
3 changed files with 291 additions and 291 deletions
|
|
@ -58,7 +58,7 @@ async function cleanProfileTarget(profileDir: string, packages: Packages, checkT
|
|||
let keepProfile = new Set(["build", ".fingerprint", "deps"]);
|
||||
await rmExcept(profileDir, keepProfile);
|
||||
|
||||
const keepPkg = new Set(packages.map((p) => p.name));
|
||||
const keepPkg = new Set(packages.flatMap((p) => [p.name, ...p.targets.map((t) => t.replace(/-/g, "_"))]));
|
||||
await rmExcept(path.join(profileDir, "build"), keepPkg, checkTimestamp);
|
||||
await rmExcept(path.join(profileDir, ".fingerprint"), keepPkg, checkTimestamp);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue