aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/main.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-16 02:56:15 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-21 14:49:43 +0100
commitdfe231a2b03efa31ae4ff9a43e469144560eec8f (patch)
treeadd668ef2daf5f0f9b550eb96e951140e6407644 /mumd/src/main.rs
parentd6348155f3420e9c01f805f0bb3a520cbd1d4c1c (diff)
downloadmum-dfe231a2b03efa31ae4ff9a43e469144560eec8f.tar.gz
add a --version that includes commit hash to mum{ctl,d}
Diffstat (limited to 'mumd/src/main.rs')
-rw-r--r--mumd/src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/mumd/src/main.rs b/mumd/src/main.rs
index 0526930..e7b4bec 100644
--- a/mumd/src/main.rs
+++ b/mumd/src/main.rs
@@ -15,6 +15,11 @@ use tokio::task::spawn_blocking;
#[tokio::main]
async fn main() {
+ if std::env::args().find(|s| s.as_str() == "--version").is_some() {
+ println!(env!("VERSION"));
+ return;
+ }
+
setup_logger(std::io::stderr(), true);
notify::init();