keel/version/keel.go

43 lines
893 B
Go
Raw Normal View History

2017-06-15 07:46:52 +00:00
package version
import (
"runtime"
2017-11-01 18:25:28 +00:00
"github.com/keel-hq/keel/types"
2017-06-15 07:46:52 +00:00
)
2017-08-08 20:47:29 +00:00
// Generic tool info
2017-06-15 07:46:52 +00:00
const (
ProductName string = "keel"
APIVersion = "1"
)
// Revision that was compiled. This will be filled in by the compiler.
var Revision string
// BuildDate is when the binary was compiled. This will be filled in by the
// compiler.
var BuildDate string
// Version number that is being run at the moment. Version should use semver.
var Version string
// Experimental is intended to be used to enable alpha features.
var Experimental string
// GetKeelVersion returns version info.
func GetKeelVersion() types.VersionInfo {
v := types.VersionInfo{
Name: ProductName,
Revision: Revision,
BuildDate: BuildDate,
Version: Version,
APIVersion: APIVersion,
GoVersion: runtime.Version(),
OS: runtime.GOOS,
Arch: runtime.GOARCH,
}
return v
}