diff options
author | Wim <wim@42.be> | 2016-06-23 20:31:12 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-06-23 20:31:12 +0200 |
commit | 0f2976c5ce176a529c862907add54874ffd70252 (patch) | |
tree | d62978bc849a9fa56e69afeb08979ccd4dc13d98 /matterbridge.go | |
parent | 78b17977c550978f0d07ae379a37d73b7baa863f (diff) | |
download | matterbridge-msglm-0f2976c5ce176a529c862907add54874ffd70252.tar.gz matterbridge-msglm-0f2976c5ce176a529c862907add54874ffd70252.tar.bz2 matterbridge-msglm-0f2976c5ce176a529c862907add54874ffd70252.zip |
Release v0.4.2v0.4.2
Diffstat (limited to 'matterbridge.go')
-rw-r--r-- | matterbridge.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/matterbridge.go b/matterbridge.go index 5e0ed2d6..a40ec8a0 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -2,10 +2,13 @@ package main import ( "flag" + "fmt" "github.com/42wim/matterbridge-plus/bridge" log "github.com/Sirupsen/logrus" ) +var Version = "0.4.2" + func init() { log.SetFormatter(&log.TextFormatter{FullTimestamp: true}) } @@ -13,11 +16,18 @@ func init() { func main() { flagConfig := flag.String("conf", "matterbridge.conf", "config file") flagDebug := flag.Bool("debug", false, "enable debug") + flagVersion := flag.Bool("version", false, "show version") + flag.Parse() + if *flagVersion { + fmt.Println("Version:", Version) + return + } flag.Parse() if *flagDebug { log.Info("enabling debug") log.SetLevel(log.DebugLevel) } + fmt.Println("running version", Version) bridge.NewBridge("matterbot", bridge.NewConfig(*flagConfig), "legacy") select {} } |