Skip to content

Commit

Permalink
cli: change label on printed build revision
Browse files Browse the repository at this point in the history
Fixes #52249

Release note (cli change): update label used for commit ID in printed version info
  • Loading branch information
dbist committed Aug 3, 2020
1 parent b0ec3c9 commit 0664a5d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,18 @@ Output build version information.
RunE: func(cmd *cobra.Command, args []string) error {
info := build.GetInfo()
tw := tabwriter.NewWriter(os.Stdout, 2, 1, 2, ' ', 0)
fmt.Fprintf(tw, "Build Tag: %s\n", info.Tag)
fmt.Fprintf(tw, "Build Time: %s\n", info.Time)
fmt.Fprintf(tw, "Distribution: %s\n", info.Distribution)
fmt.Fprintf(tw, "Platform: %s", info.Platform)
fmt.Fprintf(tw, "Build Tag: %s\n", info.Tag)
fmt.Fprintf(tw, "Build Time: %s\n", info.Time)
fmt.Fprintf(tw, "Distribution: %s\n", info.Distribution)
fmt.Fprintf(tw, "Platform: %s", info.Platform)
if info.CgoTargetTriple != "" {
fmt.Fprintf(tw, " (%s)", info.CgoTargetTriple)
}
fmt.Fprintln(tw)
fmt.Fprintf(tw, "Go Version: %s\n", info.GoVersion)
fmt.Fprintf(tw, "C Compiler: %s\n", info.CgoCompiler)
fmt.Fprintf(tw, "Build SHA-1: %s\n", info.Revision)
fmt.Fprintf(tw, "Build Type: %s\n", info.Type)
fmt.Fprintf(tw, "Go Version: %s\n", info.GoVersion)
fmt.Fprintf(tw, "C Compiler: %s\n", info.CgoCompiler)
fmt.Fprintf(tw, "Build Commit ID: %s\n", info.Revision)
fmt.Fprintf(tw, "Build Type: %s\n", info.Type)
return tw.Flush()
},
}
Expand Down

0 comments on commit 0664a5d

Please sign in to comment.