提交 0cea7ccc 编写于 作者: A Alessandro Arzilli 提交者: Derek Parker

cmd/dlv: bugfix: make version command actually print revision number (#926)

上级 135330cb
......@@ -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() {
version.DelveVersion.Build = Build
if Build != "" {
version.DelveVersion.Build = Build
}
cmds.New(false).Execute()
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册