update shadow-rs to 0.37 (#14617)

This commit is contained in:
Wind
2024-12-18 23:09:50 +08:00
committed by GitHub
parent 68c2729991
commit fff0c6e2cb
3 changed files with 11 additions and 10 deletions

View File

@ -21,10 +21,10 @@ nu-protocol = { path = "../nu-protocol", version = "0.100.1", default-features =
nu-utils = { path = "../nu-utils", version = "0.100.1", default-features = false }
itertools = { workspace = true }
shadow-rs = { version = "0.36", default-features = false }
shadow-rs = { version = "0.37", default-features = false }
[build-dependencies]
shadow-rs = { version = "0.36", default-features = false }
shadow-rs = { version = "0.37", default-features = false }
[features]
default = ["os"]
@ -42,4 +42,4 @@ mimalloc = []
trash-support = []
sqlite = []
static-link-openssl = []
system-clipboard = []
system-clipboard = []

View File

@ -1,12 +1,13 @@
use std::process::Command;
fn main() -> shadow_rs::SdResult<()> {
fn main() {
// Look up the current Git commit ourselves instead of relying on shadow_rs,
// because shadow_rs does it in a really slow-to-compile way (it builds libgit2)
let hash = get_git_hash().unwrap_or_default();
println!("cargo:rustc-env=NU_COMMIT_HASH={hash}");
shadow_rs::new()
shadow_rs::ShadowBuilder::builder()
.build()
.expect("shadow builder build should success");
}
fn get_git_hash() -> Option<String> {