diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 64bd0a6bc..268902d4d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -27,7 +27,7 @@ about: Tell us about a problem you are experiencing **Environment:** -- Ark version (use `ark version`): +- Ark version (use `ark version`): - Kubernetes version (use `kubectl version`): - Kubernetes installer & version: - Cloud provider or hardware configuration: diff --git a/pkg/cmd/cli/bug/bug.go b/pkg/cmd/cli/bug/bug.go index 6c12e86b2..33f2c5bc3 100644 --- a/pkg/cmd/cli/bug/bug.go +++ b/pkg/cmd/cli/bug/bug.go @@ -71,7 +71,7 @@ about: Tell us about a problem you are experiencing **Environment:** -- Ark version (use ` + "`ark version`" + `):{{.ArkVersion}} {{.GitCommit}} {{.GitTreeState}} +- Ark version (use ` + "`ark version`" + `):{{.ArkVersion}} {{.GitCommit}} - Kubernetes version (use ` + "`kubectl version`" + `): {{- if .KubectlVersion}} ` + "```" + ` @@ -109,7 +109,6 @@ func NewCommand() *cobra.Command { type ArkBugInfo struct { ArkVersion string GitCommit string - GitTreeState string RuntimeOS string RuntimeArch string KubectlVersion string @@ -162,8 +161,7 @@ func getKubectlVersion() (string, error) { func newBugInfo(kubectlVersion string) *ArkBugInfo { return &ArkBugInfo{ ArkVersion: buildinfo.Version, - GitCommit: buildinfo.GitSHA, - GitTreeState: buildinfo.GitTreeState, + GitCommit: buildinfo.FormattedGitSHA(), RuntimeOS: runtime.GOOS, RuntimeArch: runtime.GOARCH, KubectlVersion: kubectlVersion} diff --git a/pkg/cmd/version/version.go b/pkg/cmd/version/version.go index c4165d1b3..87bd73bbe 100644 --- a/pkg/cmd/version/version.go +++ b/pkg/cmd/version/version.go @@ -30,8 +30,7 @@ func NewCommand() *cobra.Command { Short: "Print the ark version and associated image", Run: func(cmd *cobra.Command, args []string) { fmt.Printf("Version: %s\n", buildinfo.Version) - fmt.Printf("Git commit: %s\n", buildinfo.GitSHA) - fmt.Printf("Git tree state: %s\n", buildinfo.GitTreeState) + fmt.Printf("Git commit: %s\n", buildinfo.FormattedGitSHA()) }, }