2019-05-29 15:24:19 -07:00
|
|
|
package version
|
|
|
|
|
2019-11-18 11:41:37 -08:00
|
|
|
import (
|
|
|
|
"github.com/golang/glog"
|
|
|
|
)
|
|
|
|
|
2019-05-29 15:24:19 -07:00
|
|
|
// These fields are set during an official build
|
2019-11-18 11:41:37 -08:00
|
|
|
// Global vars set from command-line arguments
|
2019-05-29 15:24:19 -07:00
|
|
|
var (
|
|
|
|
BuildVersion = "--"
|
|
|
|
BuildHash = "--"
|
|
|
|
BuildTime = "--"
|
|
|
|
)
|
|
|
|
|
2019-11-18 11:41:37 -08:00
|
|
|
//PrintVersionInfo displays the kyverno version - git version
|
|
|
|
func PrintVersionInfo() {
|
|
|
|
glog.Infof("Kyverno version: %s\n", BuildVersion)
|
|
|
|
glog.Infof("Kyverno BuildHash: %s\n", BuildHash)
|
|
|
|
glog.Infof("Kyverno BuildTime: %s\n", BuildTime)
|
2019-05-29 15:24:19 -07:00
|
|
|
}
|