Handle -version flag on all commands

Tested: Passed -version argument to kubelet (and all other binaries):
  $ output/go/bin/kubecfg -version
  Kubernetes version 0.1, build 6454a541fd56

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit is contained in:
Filipe Brandenburger
2014-07-30 15:21:34 -07:00
parent 76e2cd70f7
commit 7e56609139
7 changed files with 38 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/proxy"
"github.com/GoogleCloudPlatform/kubernetes/pkg/proxy/config"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
"github.com/coreos/go-etcd/etcd"
"github.com/golang/glog"
)
@@ -40,6 +41,8 @@ func main() {
util.InitLogs()
defer util.FlushLogs()
version.PrintAndExitIfRequested()
// Set up logger for etcd client
etcd.SetLogger(util.NewLogger("etcd "))