summaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-01-12 03:41:15 -0500
committerGitHub <noreply@github.com>2023-01-12 03:41:15 -0500
commitfffeb206de4a46cac7a1eb3179318fdaec16157e (patch)
tree1c6ae7ea5d5c9255dc9c8a0b92b03c90b3b9f1e6 /build.rs
parent48cd29f2dd37c28dac7719a0fcf9886ef1cca681 (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.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index d7c06782..a37ecf19 100644
--- a/build.rs
+++ b/build.rs
@@ -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();