Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit a0dcfffe01604675cb298100874338e42bd3e3dd Author: Wim <wim@42.be> Date: Thu Jun 23 20:31:12 2016 +0000 Release v0.4.2 diff --git a/README.md b/README.md index 241ef7e..2b8e20b 100644 --- a/README.md +++ b/README.md @@ -87 +87 @@ Requires mattermost 1.2.0+  There is also [matterbridge-plus] (https://github.com/42wim/matterbridge-plus) which uses the mattermost API and needs a dedicated user (bot). But requires no incoming/outgoing webhook setup.    ## binaries -Binaries can be found [here] (https://github.com/42wim/matterbridge/releases/tag/v0.4.1) +Binaries can be found [here] (https://github.com/42wim/matterbridge/releases/tag/v0.4.2)    ## building  Go 1.6+ is required. Make sure you have [Go](https://golang.org/doc/install) properly installed, including setting up your [GOPATH] (https://golang.org/doc/code.html#GOPATH) diff --git a/matterbridge.go b/matterbridge.go index 5e0ed2d..a40ec8a 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -210 +213 @@ 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})  } @@ -1311 +1618 @@ 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 {}  }