diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2023-01-12 03:41:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 03:41:15 -0500 |
commit | fffeb206de4a46cac7a1eb3179318fdaec16157e (patch) | |
tree | 1c6ae7ea5d5c9255dc9c8a0b92b03c90b3b9f1e6 /build.rs | |
parent | 48cd29f2dd37c28dac7719a0fcf9886ef1cca681 (diff) |
ci: follow .deb naming conventions (#969)
Change the .deb file generation back to following standard naming conventions.
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -70,8 +70,12 @@ fn nightly_version() { .and_then(|cirrus_sha: &str| cirrus_sha.get(0..8)) { println!("cargo:rustc-env=NIGHTLY_VERSION={version}-nightly-{git_hash}"); + } else if let Some(git_hash) = + option_env!("GITHUB_SHA").and_then(|gha_sha: &str| gha_sha.get(0..8)) + { + println!("cargo:rustc-env=NIGHTLY_VERSION={version}-nightly-{git_hash}"); } else if let Ok(output) = std::process::Command::new("git") - .args(["rev-parse", "--short", "HEAD"]) + .args(["rev-parse", "--short=8", "HEAD"]) .output() { let git_hash = String::from_utf8(output.stdout).unwrap(); |