aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-03 11:09:36 +0000
committerGitHub <[email protected]>2020-03-03 11:09:36 +0000
commitb358fe19d73c80df31cf9c70f35a4e2c8b280fc4 (patch)
tree7c14e924e679997af03002fc6c02c59b37727596 /xtask
parentce5684216eda52a6da6a2933a980bd5655da61b8 (diff)
parente070553cef4bb5ccd9faacc248179c42d738624f (diff)
Merge #3416
3416: Clean xtask partial artifacts in `xtask pre-cache` r=matklad a=CAD97 Confirmed that these aren't getting deleted locally. This won't actually change what's cached until the cache key changes. Co-authored-by: Christopher Durham <[email protected]>
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 55cdee491..f48045d17 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -139,12 +139,15 @@ pub fn run_pre_cache() -> Result<()> {
139 } 139 }
140 140
141 fs2::remove_file("./target/.rustc_info.json")?; 141 fs2::remove_file("./target/.rustc_info.json")?;
142 let to_delete = ["ra_", "heavy_test"]; 142 let to_delete = ["ra_", "heavy_test", "xtask"];
143 for &dir in ["./target/debug/deps", "target/debug/.fingerprint"].iter() { 143 for &dir in ["./target/debug/deps", "target/debug/.fingerprint"].iter() {
144 for entry in Path::new(dir).read_dir()? { 144 for entry in Path::new(dir).read_dir()? {
145 let entry = entry?; 145 let entry = entry?;
146 if to_delete.iter().any(|&it| entry.path().display().to_string().contains(it)) { 146 if to_delete.iter().any(|&it| entry.path().display().to_string().contains(it)) {
147 rm_rf(&entry.path())? 147 // Can't delete yourself on windows :-(
148 if !entry.path().ends_with("xtask.exe") {
149 rm_rf(&entry.path())?
150 }
148 } 151 }
149 } 152 }
150 } 153 }