build: Add git sha to version output

This commit is contained in:
Derek Parker
2015-12-13 13:51:11 -08:00
committed by aarzilli
parent 4a652b8f91
commit 0abc772023
2 changed files with 10 additions and 2 deletions

View File

@ -24,6 +24,8 @@ import (
const version string = "0.10.0-alpha"
var Build string
var (
Log bool
Headless bool
@ -59,7 +61,7 @@ The goal of this tool is to provide a simple yet powerful interface for debuggin
Use: "version",
Short: "Prints version.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Delve version: " + version)
fmt.Printf("Delve Debugger\nVersion: %s\nBuild: %s\n", version, Build)
},
}
rootCommand.AddCommand(versionCommand)