faas/watchdog/version.go
Vivek Singh c258637d6d Added -version flag to watchdog
This changes introduces a new flag -version to watchdog which will
display version and SHA of last git commit.

Version and SHA are injected at build time and passed as a
build-args for Dockerfile.

Fixes: #632

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-04-14 17:19:53 -07:00

19 lines
354 B
Go

package main
var (
//Version release version of the watchdog
Version string
//GitCommit SHA of the last git commit
GitCommit string
//DevVerison string for the development version
DevVerison = "dev"
)
//BuildVersion returns current version of watchdog
func BuildVersion() string {
if len(Version) == 0 {
return DevVerison
}
return Version
}