mirror of
https://github.com/go-delve/delve.git
synced 2025-11-03 22:08:33 +08:00
cmd/dlv: bugfix: make version command actually print revision number (#926)
This commit is contained in:
committed by
Derek Parker
parent
135330cbb2
commit
0cea7ccc23
5
Makefile
5
Makefile
@ -2,10 +2,13 @@
|
||||
UNAME=$(shell uname)
|
||||
PREFIX=github.com/derekparker/delve
|
||||
GOVERSION=$(shell go version)
|
||||
BUILD_SHA=$(shell git rev-parse HEAD)
|
||||
LLDB_SERVER=$(shell which lldb-server)
|
||||
|
||||
ifeq "$(UNAME)" "Darwin"
|
||||
BUILD_FLAGS=-ldflags="-s"
|
||||
BUILD_FLAGS=-ldflags="-s -X main.Build=$(BUILD_SHA)"
|
||||
else
|
||||
BUILD_FLAGS=-ldflags="-X main.Build=$(BUILD_SHA)"
|
||||
endif
|
||||
|
||||
# Workaround for GO15VENDOREXPERIMENT bug (https://github.com/golang/go/issues/11659)
|
||||
|
||||
@ -9,6 +9,8 @@ import (
|
||||
var Build string
|
||||
|
||||
func main() {
|
||||
if Build != "" {
|
||||
version.DelveVersion.Build = Build
|
||||
}
|
||||
cmds.New(false).Execute()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user