Skip to content

Commit

Permalink
Allow usage of GITHUB_SHA for CI purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
rnijveld committed Oct 4, 2023
1 parent abbf54e commit 7f5a7cb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ntpd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ fn main() {
// use environment variable for the git commit rev if set
let git_rev = std::env::var("NTPD_RS_GIT_REV").ok();

// allow usage of the GITHUB_SHA environment variable during CI
let git_rev = if let Some(gr) = git_rev {
Some(gr)
} else {
std::env::var("GITHUB_SHA").ok()
};

// determine the git commit (if there is any)
let git_rev = if let Some(gr) = git_rev {
Some(gr)
Expand Down

0 comments on commit 7f5a7cb

Please sign in to comment.