Skip to content

Commit 1ac031f

Browse files
committed
don't bother with strip on xtask build
1 parent b0633ec commit 1ac031f

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

xtask/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@ anyhow = "1.0"
1111
clap = { version = "4.0.9", features = ["derive"] }
1212
clap_mangen = "0.2.2"
1313
dirs-next = "2.0.0"
14-
iroh = { path = "../iroh" }
15-
which = "4.3.0"
14+
iroh = { path = "../iroh" }

xtask/src/main.rs

+3-17
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ fn dev_install(build: bool) -> Result<()> {
5959
if build {
6060
dist().unwrap();
6161
}
62-
let bins = vec!["iroh", "iroh-one", "iroh-gateway", "iroh-p2p", "iroh-store"];
62+
let bins = ["iroh", "iroh-one", "iroh-gateway", "iroh-p2p", "iroh-store"];
6363
let home = dirs_next::home_dir().unwrap();
6464
for bin in bins {
6565
let from = project_root().join(format!("target/release/{}", bin));
6666
let to = home.join(format!(".cargo/bin/{}", bin));
67-
println!("copying {} to {}", bin, to.to_str().unwrap());
68-
fs::copy(from, to).unwrap();
67+
println!("copying {} to {}", bin, to.display());
68+
fs::copy(from, to)?;
6969
}
7070
Ok(())
7171
}
@@ -81,20 +81,6 @@ fn dist_binaries() -> Result<()> {
8181
Err(anyhow::anyhow!("cargo build failed"))?;
8282
}
8383

84-
let dst = project_root().join("target/release/iroh");
85-
86-
fs::copy(&dst, dist_dir().join("iroh"))?;
87-
88-
if which::which("strip").is_ok() {
89-
eprintln!("stripping the binary");
90-
let status = Command::new("strip").arg(&dst).status()?;
91-
if !status.success() {
92-
Err(anyhow::anyhow!("strip failed"))?;
93-
}
94-
} else {
95-
eprintln!("no `strip` utility found")
96-
}
97-
9884
Ok(())
9985
}
10086

0 commit comments

Comments
 (0)