version: add commit id to binary during build

This commit is contained in:
Ramkumar Chinchani
2019-09-16 11:01:59 -07:00
parent 487df473c5
commit 4d73d8ff47
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func NewRootCmd() *cobra.Command {
Long: "`zot`",
Run: func(cmd *cobra.Command, args []string) {
if showVersion {
log.Info().Str("version", dspec.Version).Msg("distribution-spec")
log.Info().Str("distribution-spec", dspec.Version).Str("commit", api.Commit).Msg("version")
}
_ = cmd.Usage()
},