mirror of
https://github.com/jht5945/buildj.git
synced 2025-12-27 17:20:06 +08:00
build date
This commit is contained in:
2
build.rs
2
build.rs
@@ -3,7 +3,7 @@ fn main() {
|
||||
let output = Command::new("git").args(&["rev-parse", "HEAD"]).output().unwrap();
|
||||
let git_hash = String::from_utf8(output.stdout).unwrap();
|
||||
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
|
||||
let date_output = Command::new("date").output().unwrap();
|
||||
let date_output = Command::new("date").args(&["+%Y-%m-%dT%H:%M:%S%z"]).output().unwrap();
|
||||
let date = String::from_utf8(date_output.stdout).unwrap();
|
||||
println!("cargo:rustc-env=BUILD_DATE={}", date);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ fn main() {
|
||||
|
||||
if *VERBOSE {
|
||||
print_message(MessageType::DEBUG, &format!("Full GIT_HASH: {}", GIT_HASH));
|
||||
print_message(MessageType::DEBUG, &format!("Binary build date: {}", BUILD_DATE));
|
||||
print_message(MessageType::DEBUG, &format!("Build date: {}", BUILD_DATE));
|
||||
}
|
||||
|
||||
let args = local_util::get_args_as_vec();
|
||||
|
||||
Reference in New Issue
Block a user