-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eason
committed
Aug 7, 2023
1 parent
6e60f88
commit e298ecc
Showing
5 changed files
with
49 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
fn main() { | ||
let commit_id = std::process::Command::new("git") | ||
.args([ | ||
"describe", | ||
"--always", | ||
"--match", | ||
"__EXCLUDE__", | ||
"--abbrev=7", | ||
]) | ||
if let Some(commit_id) = std::process::Command::new("git") | ||
.args(["describe", "--always", "--dirty", "--exclude", "*"]) | ||
.output() | ||
.map(|r| String::from_utf8(r.stdout).unwrap()) | ||
.unwrap(); | ||
|
||
println!("cargo:rustc-env=AXON_COMMIT_ID={}", commit_id); | ||
.ok() | ||
.and_then(|r| String::from_utf8(r.stdout).ok()) | ||
{ | ||
println!("cargo:rustc-env=AXON_COMMIT_ID={}", commit_id); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters