From 4f9640ff39f95231f7d265c2c25a05c3f687b6a3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 26 Apr 2021 15:20:15 +0300 Subject: fix: add date to the version string on Mac It doesn't support `--iso` --- crates/rust-analyzer/build.rs | 2 +- xtask/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rust-analyzer/build.rs b/crates/rust-analyzer/build.rs index 25627c7e9..780d247c9 100644 --- a/crates/rust-analyzer/build.rs +++ b/crates/rust-analyzer/build.rs @@ -55,7 +55,7 @@ fn commit_hash() -> Option { } fn build_date() -> Option { - output_to_string("date --iso --utc") + output_to_string("date --utc +%Y-%m-%d") } fn output_to_string(command: &str) -> Option { diff --git a/xtask/src/main.rs b/xtask/src/main.rs index e0e620c76..01bf6e70d 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -108,7 +108,7 @@ fn run_fuzzer() -> Result<()> { } fn date_iso() -> Result { - let res = cmd!("date --iso --utc").read()?; + let res = cmd!("date --utc +%Y-%m-%d").read()?; Ok(res) } -- cgit v1.2.3