mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Add option to overwrite git hash on build
This commit is contained in:
parent
442173c08c
commit
55f1e1d32d
1 changed files with 2 additions and 1 deletions
|
|
@ -1,7 +1,8 @@
|
|||
fn main() -> std::io::Result<()> {
|
||||
println!(
|
||||
"cargo:rustc-env=GIT_HASH={}",
|
||||
get_short_commit_hash()?.unwrap_or_default()
|
||||
std::env::var("CRUNCHY_CLI_GIT_HASH")
|
||||
.or::<std::io::Error>(Ok(get_short_commit_hash()?.unwrap_or_default()))?
|
||||
);
|
||||
println!(
|
||||
"cargo:rustc-env=BUILD_DATE={}",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue