Only set version ldflags on tags
This commit is contained in:
parent
9938e08d28
commit
3b54838eca
7
Makefile
7
Makefile
|
|
@ -44,7 +44,12 @@ MAKEFLAGS += --no-print-directory
|
|||
GOOS ?= $(shell go env GOOS)
|
||||
GOARCH ?= $(shell go env GOARCH)
|
||||
HOSTGO := env -u GOOS -u GOARCH -u GOARM -- go
|
||||
LDFLAGS := $(LDFLAGS) -X main.commit=$(commit) -X main.branch=$(branch) -X main.version=$(version)
|
||||
|
||||
LDFLAGS := $(LDFLAGS) -X main.commit=$(commit) -X main.branch=$(branch)
|
||||
ifneq ($(tag),)
|
||||
LDFLAGS += -X main.version=$(version)
|
||||
endif
|
||||
|
||||
GOFILES ?= $(shell git ls-files '*.go')
|
||||
GOFMT ?= $(shell gofmt -l -s $(filter-out plugins/parsers/influx/machine.go, $(GOFILES)))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue