diff --git a/Dockerfile b/Dockerfile index c9a50055..508553b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,6 @@ RUN apk update && apk add go git gcc musl-dev ca-certificates \ && cd /go/src/github.com/42wim/matterircd \ && export GOPATH=/go \ && go get \ - && go build -o /bin/matterircd \ + && go build -x -ldflags "-X main.githash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterircd \ && rm -rf /go \ && apk del --purge git go gcc musl-dev diff --git a/README.md b/README.md index 4591d6a9..68f09a7d 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ docker run -p 6667:6667 42wim/matterircd:latest -bind 0.0.0.0:6667 Now you can connect with your IRC client to port 6667 on your docker host. # Compatibility -* Matterircd v0.11.2 works with mattermost 3.5.x - 3.7.0 [3.7.0 release](https://github.com/mattermost/platform/releases/tag/v3.7.0) +* Matterircd v0.11.3 works with mattermost 3.5.x - 3.8.0 [3.8.0 release](https://github.com/mattermost/platform/releases/tag/v3.8.0) * Matterircd v0.10.2 works with mattermost 3.3.0 - 3.4.0 [3.4.0 release](https://github.com/mattermost/platform/releases/tag/v3.4.0) Master branch of matterircd should always work against latest STABLE mattermost release. @@ -43,7 +43,7 @@ If you want to run matterircd with mattermost DEV builds, use the develop branch # Binaries You can find the binaries [here](https://github.com/42wim/matterircd/releases/) -* For use with mattermost 3.5.0 and higher [v0.11.2](https://github.com/42wim/matterircd/releases/tag/v0.11.2) +* For use with mattermost 3.5.0 and higher [v0.11.3](https://github.com/42wim/matterircd/releases/tag/v0.11.3) * For use with mattermost 3.3.0-3.4.0 [v0.10.2](https://github.com/42wim/matterircd/releases/tag/v0.10.2) # Building diff --git a/changelog.md b/changelog.md index 69677c8b..8a25483e 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,5 @@ -# v0.11.3-dev -* Support mattermost 3.7.0 +# v0.11.3 +* Support mattermost 3.7.0 and 3.8.0 ## Bugfix * Make public links (pasted images/attachments) work again diff --git a/main.go b/main.go index f547d5ea..d0d2da34 100644 --- a/main.go +++ b/main.go @@ -11,10 +11,13 @@ import ( "strings" ) -var flagRestrict, flagDefaultTeam, flagDefaultServer, flagTLSBind, flagTLSDir *string -var flagInsecure *bool -var version = "0.11.3-dev" -var logger *logrus.Entry +var ( + flagRestrict, flagDefaultTeam, flagDefaultServer, flagTLSBind, flagTLSDir *string + flagInsecure *bool + version = "0.11.3" + githash string + logger *logrus.Entry +) func main() { flagDebug := flag.Bool("debug", false, "enable debug logging") @@ -39,12 +42,10 @@ func main() { ourlog.Level = logrus.DebugLevel irckit.SetLogLevel("debug") } - if *flagVersion { - fmt.Println("Version:", version) + fmt.Printf("version: %s %s\n", version, githash) return } - irckit.SetLogger(logger) if *flagTLSBind != "" { go func() { @@ -61,6 +62,10 @@ func main() { if err != nil { logger.Errorf("Can not listen on %s: %v", *flagBind, err) } + logger.Infof("Running version %s %s", version, githash) + if strings.Contains(version, "-dev") { + logger.Infof("WARNING: THIS IS A DEVELOPMENT VERSION. Things may break.") + } logger.Infof("Listening on %s", *flagBind) defer socket.Close() start(socket)