version cmd: move tree state into git sha line
Signed-off-by: Steve Kriss <steve@heptio.com>pull/1124/head
parent
ac317a87ff
commit
246d75811a
|
@ -27,7 +27,7 @@ about: Tell us about a problem you are experiencing
|
||||||
|
|
||||||
**Environment:**
|
**Environment:**
|
||||||
|
|
||||||
- Ark version (use `ark version`):
|
- Ark version (use `ark version`):
|
||||||
- Kubernetes version (use `kubectl version`):
|
- Kubernetes version (use `kubectl version`):
|
||||||
- Kubernetes installer & version:
|
- Kubernetes installer & version:
|
||||||
- Cloud provider or hardware configuration:
|
- Cloud provider or hardware configuration:
|
||||||
|
|
|
@ -71,7 +71,7 @@ about: Tell us about a problem you are experiencing
|
||||||
|
|
||||||
**Environment:**
|
**Environment:**
|
||||||
|
|
||||||
- Ark version (use ` + "`ark version`" + `):{{.ArkVersion}} {{.GitCommit}} {{.GitTreeState}}
|
- Ark version (use ` + "`ark version`" + `):{{.ArkVersion}} {{.GitCommit}}
|
||||||
- Kubernetes version (use ` + "`kubectl version`" + `):
|
- Kubernetes version (use ` + "`kubectl version`" + `):
|
||||||
{{- if .KubectlVersion}}
|
{{- if .KubectlVersion}}
|
||||||
` + "```" + `
|
` + "```" + `
|
||||||
|
@ -109,7 +109,6 @@ func NewCommand() *cobra.Command {
|
||||||
type ArkBugInfo struct {
|
type ArkBugInfo struct {
|
||||||
ArkVersion string
|
ArkVersion string
|
||||||
GitCommit string
|
GitCommit string
|
||||||
GitTreeState string
|
|
||||||
RuntimeOS string
|
RuntimeOS string
|
||||||
RuntimeArch string
|
RuntimeArch string
|
||||||
KubectlVersion string
|
KubectlVersion string
|
||||||
|
@ -162,8 +161,7 @@ func getKubectlVersion() (string, error) {
|
||||||
func newBugInfo(kubectlVersion string) *ArkBugInfo {
|
func newBugInfo(kubectlVersion string) *ArkBugInfo {
|
||||||
return &ArkBugInfo{
|
return &ArkBugInfo{
|
||||||
ArkVersion: buildinfo.Version,
|
ArkVersion: buildinfo.Version,
|
||||||
GitCommit: buildinfo.GitSHA,
|
GitCommit: buildinfo.FormattedGitSHA(),
|
||||||
GitTreeState: buildinfo.GitTreeState,
|
|
||||||
RuntimeOS: runtime.GOOS,
|
RuntimeOS: runtime.GOOS,
|
||||||
RuntimeArch: runtime.GOARCH,
|
RuntimeArch: runtime.GOARCH,
|
||||||
KubectlVersion: kubectlVersion}
|
KubectlVersion: kubectlVersion}
|
||||||
|
|
|
@ -30,8 +30,7 @@ func NewCommand() *cobra.Command {
|
||||||
Short: "Print the ark version and associated image",
|
Short: "Print the ark version and associated image",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Printf("Version: %s\n", buildinfo.Version)
|
fmt.Printf("Version: %s\n", buildinfo.Version)
|
||||||
fmt.Printf("Git commit: %s\n", buildinfo.GitSHA)
|
fmt.Printf("Git commit: %s\n", buildinfo.FormattedGitSHA())
|
||||||
fmt.Printf("Git tree state: %s\n", buildinfo.GitTreeState)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue