makefile: use git's $Id$ instead of setting ver.Build in makefile (#807)
This commit is contained in:
parent
c67986ed7d
commit
24b20099aa
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
pkg/version/version.go ident
|
5
Makefile
5
Makefile
@ -2,13 +2,10 @@
|
|||||||
UNAME=$(shell uname)
|
UNAME=$(shell uname)
|
||||||
PREFIX=github.com/derekparker/delve
|
PREFIX=github.com/derekparker/delve
|
||||||
GOVERSION=$(shell go version)
|
GOVERSION=$(shell go version)
|
||||||
BUILD_SHA=$(shell git rev-parse HEAD)
|
|
||||||
LLDB_SERVER=$(shell which lldb-server)
|
LLDB_SERVER=$(shell which lldb-server)
|
||||||
|
|
||||||
ifeq "$(UNAME)" "Darwin"
|
ifeq "$(UNAME)" "Darwin"
|
||||||
BUILD_FLAGS=-ldflags="-s -X main.Build=$(BUILD_SHA)"
|
BUILD_FLAGS=-ldflags="-s"
|
||||||
else
|
|
||||||
BUILD_FLAGS=-ldflags="-X main.Build=$(BUILD_SHA)"
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Workaround for GO15VENDOREXPERIMENT bug (https://github.com/golang/go/issues/11659)
|
# Workaround for GO15VENDOREXPERIMENT bug (https://github.com/golang/go/issues/11659)
|
||||||
|
@ -13,7 +13,10 @@ type Version struct {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// DelveVersion is the current version of Delve.
|
// DelveVersion is the current version of Delve.
|
||||||
DelveVersion = Version{Major: "0", Minor: "12", Patch: "2", Metadata: ""}
|
DelveVersion = Version{
|
||||||
|
Major: "0", Minor: "12", Patch: "2", Metadata: "",
|
||||||
|
Build: "$Id$",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func (v Version) String() string {
|
func (v Version) String() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user