Print the revision, if known, separately from the version.

Also, indicate whether the build is dynamic or not.
This commit is contained in:
Jeff Mitchell
2016-11-27 19:28:35 -05:00
parent 2b5fb353f3
commit c91a7c51a2
4 changed files with 23 additions and 9 deletions

View File

@@ -466,10 +466,15 @@ func (c *ServerCommand) Run(args []string) int {
infoKeys = append(infoKeys, "version")
verInfo := version.GetVersion()
info["version"] = verInfo.FullVersionNumber()
info["version"] = verInfo.FullVersionNumber(false)
if verInfo.Revision != "" {
info["version_sha"] = strings.Trim(verInfo.Revision, "'")
infoKeys = append(infoKeys, "version_sha")
info["version sha"] = strings.Trim(verInfo.Revision, "'")
infoKeys = append(infoKeys, "version sha")
}
infoKeys = append(infoKeys, "cgo")
info["cgo"] = "disabled"
if version.CgoEnabled {
info["cgo"] = "enabled"
}
// Server configuration output