aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2021-01-03 11:42:09 -0500
committerChristine Dodrill <me@christine.website>2021-01-03 11:42:09 -0500
commit1ae1cc294560d8c99aaf8f49baa016104cda8ff7 (patch)
tree5544e35e695f9a11014ad77974d50481f9bda027 /src
parent951542ccf26c1089c24100f0ff1208981979c841 (diff)
downloadxesite-1ae1cc294560d8c99aaf8f49baa016104cda8ff7.tar.xz
xesite-1ae1cc294560d8c99aaf8f49baa016104cda8ff7.zip
</kubernetes>
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'src')
-rw-r--r--src/build.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/build.rs b/src/build.rs
index 0d8d5a5..600de8a 100644
--- a/src/build.rs
+++ b/src/build.rs
@@ -9,6 +9,13 @@ fn main() -> Result<()> {
.output()
.unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap();
- println!("cargo:rustc-env=GITHUB_SHA={}", git_hash);
+ println!(
+ "cargo:rustc-env=GITHUB_SHA={}",
+ if git_hash.as_str() == "" {
+ env!("out").into()
+ } else {
+ git_hash
+ }
+ );
Ok(())
}