aboutsummaryrefslogtreecommitdiff
path: root/cli/src/lib.rs
diff options
context:
space:
mode:
authorTill Höppner2016-03-09 18:56:15 +0100
committerTill Höppner2016-03-09 18:56:15 +0100
commita04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b (patch)
treecbe502d0287b4d40a3cee98d433973a4336ae710 /cli/src/lib.rs
parent58c249954e7bb8776f213248d9ca220a27c372b7 (diff)
downloadilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.tar.gz
ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.tar.xz
ilc-a04f7c45e5f6e0d656d6e6a87d63ce2bcaa0865b.zip
Mock .git for packaging purposes
Diffstat (limited to 'cli/src/lib.rs')
-rw-r--r--cli/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/src/lib.rs b/cli/src/lib.rs
index ba7f792..937ae99 100644
--- a/cli/src/lib.rs
+++ b/cli/src/lib.rs
@@ -35,7 +35,7 @@ mod stats;
pub struct Cli {
pub version: String,
- pub master_hash: String,
+ pub master_hash: Option<String>,
}
pub fn main(cli: Cli) {
@@ -44,7 +44,10 @@ pub fn main(cli: Cli) {
info!("Compiled with FUSEs")
}
- let version = format!("{} ({})", cli.version, cli.master_hash);
+ let version = match cli.master_hash {
+ Some(ref h) => format!("{} ({})", cli.version, h),
+ None => cli.version.clone(),
+ };
let args = App::new("ilc")
.version(&version[..])
.setting(AppSettings::GlobalVersion)