We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6ab753 commit cfc2ae9Copy full SHA for cfc2ae9
build.rs
@@ -1,9 +1,14 @@
1
fn get_git_hash() -> String {
2
use std::process::Command;
3
4
+ // Allow builds from `git archive` generated tarballs if output of `git get-tar-commit-id` is
5
+ // set in an env var.
6
+ if let Ok(commit) = std::env::var("TAR_COMMIT_ID") {
7
+ return commit[..7].to_string();
8
+ };
9
let commit = Command::new("git")
10
.arg("rev-parse")
- .arg("--short")
11
+ .arg("--short=7")
12
.arg("--verify")
13
.arg("HEAD")
14
.output();
0 commit comments