Skip to content

Commit 6854cbb

Browse files
author
sergeyyar
committed
add rust version
1 parent e67d697 commit 6854cbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ fn main() {
2626
let git_branch = get_value("git", &["rev-parse", "--abbrev-ref", "HEAD"]);
2727
let git_commit = get_value("git", &["rev-parse", "HEAD"]);
2828
let commit_date = get_value("git", &["log", "-1", "--date=iso", "--pretty=format:%cd"]);
29-
let build_time = get_value("date", &["+%Y-%m-%d %T %z"]);
29+
let rust_version = get_value("rustc", &["--version"]);
3030

3131
println!("cargo:rustc-env=BUILD_GIT_BRANCH={}", git_branch);
3232
println!("cargo:rustc-env=BUILD_GIT_COMMIT={}", git_commit);
3333
println!("cargo:rustc-env=BUILD_GIT_DATE={}", commit_date);
3434
println!("cargo:rustc-env=BUILD_TIME={}", build_time);
35+
println!("cargo:rustc-env=BUILD_RUST_VERSION={}", rust_version);
3536
}

0 commit comments

Comments
 (0)