aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-04-26 13:20:15 +0100
committerAleksey Kladov <[email protected]>2021-04-26 13:20:15 +0100
commit4f9640ff39f95231f7d265c2c25a05c3f687b6a3 (patch)
tree1cae58ae26f5f0d4e8b2fc260edf8222b1a1c1cb
parent869ec5f97ace736fdbf765d143c9634fd1b558ef (diff)
fix: add date to the version string on Mac
It doesn't support `--iso`
-rw-r--r--crates/rust-analyzer/build.rs2
-rw-r--r--xtask/src/main.rs2
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<String> {
55} 55}
56 56
57fn build_date() -> Option<String> { 57fn build_date() -> Option<String> {
58 output_to_string("date --iso --utc") 58 output_to_string("date --utc +%Y-%m-%d")
59} 59}
60 60
61fn output_to_string(command: &str) -> Option<String> { 61fn output_to_string(command: &str) -> Option<String> {
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<()> {
108} 108}
109 109
110fn date_iso() -> Result<String> { 110fn date_iso() -> Result<String> {
111 let res = cmd!("date --iso --utc").read()?; 111 let res = cmd!("date --utc +%Y-%m-%d").read()?;
112 Ok(res) 112 Ok(res)
113} 113}
114 114