diff options
author | Till Höppner | 2016-03-09 18:56:15 +0100 |
---|---|---|
committer | Till Höppner | 2016-03-09 18:56:15 +0100 |
commit | a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b (patch) | |
tree | cbe502d0287b4d40a3cee98d433973a4336ae710 /src/main.rs | |
parent | 58c249954e7bb8776f213248d9ca220a27c372b7 (diff) | |
download | ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.tar.gz ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.tar.xz ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.zip |
Mock .git for packaging purposes
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 0cdab68..09a0e83 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,11 +2,15 @@ extern crate ilc_cli; use ilc_cli::Cli; -static MASTER: &'static str = include_str!("../.git/refs/heads/master"); +static MASTER_HASH: &'static str = include_str!("../.git/refs/heads/master"); fn main() { ilc_cli::main(Cli { version: env!("CARGO_PKG_VERSION").into(), - master_hash: MASTER.trim_right().into(), + master_hash: if MASTER_HASH.is_empty() { + None + } else { + Some(MASTER_HASH.trim_right().to_owned()) + }, }); } |