Skip to content

Commit 6cd669e

Browse files
Merge #8668
8668: Use more cross-platform utc `date` argument r=matklad a=SomeoneToIgnore Part of #8571 ``` $ docker run -it --rm ubuntu:20.04 bash root@7393d1e7bbad:/# date -u +%Y-%m-%d 2021-04-26 ``` ``` $ date -u +%Y-%m-%d 2021-04-26 $ uname -a Darwin alaptop.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64 ``` Some of the places where I've change this do not really require it (since macos bin would have failed with `--iso` param also), but I've changed them for consistency. Co-authored-by: Kirill Bulatov <[email protected]>
2 parents eee50b6 + c24bdab commit 6cd669e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ jobs:
261261
with:
262262
node-version: 12.x
263263

264-
- run: echo "TAG=$(date --iso --utc)" >> $GITHUB_ENV
264+
- run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV
265265
if: github.ref == 'refs/heads/release'
266266
- run: echo "TAG=nightly" >> $GITHUB_ENV
267267
if: github.ref != 'refs/heads/release'

crates/rust-analyzer/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn commit_hash() -> Option<String> {
5555
}
5656

5757
fn build_date() -> Option<String> {
58-
output_to_string("date --utc +%Y-%m-%d")
58+
output_to_string("date -u +%Y-%m-%d")
5959
}
6060

6161
fn output_to_string(command: &str) -> Option<String> {

xtask/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn run_fuzzer() -> Result<()> {
108108
}
109109

110110
fn date_iso() -> Result<String> {
111-
let res = cmd!("date --utc +%Y-%m-%d").read()?;
111+
let res = cmd!("date -u +%Y-%m-%d").read()?;
112112
Ok(res)
113113
}
114114

0 commit comments

Comments
 (0)