Merge LDFLAGS from env into build

This commit is contained in:
Daniel Nelson 2017-08-10 16:33:31 -07:00
parent 1b50f14d55
commit 5003809e97
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ endif
TELEGRAF := telegraf$(shell go tool dist env | grep -q 'GOOS=.windows.' && echo .exe) TELEGRAF := telegraf$(shell go tool dist env | grep -q 'GOOS=.windows.' && echo .exe)
LDFLAGS := -X main.commit=$(COMMIT) -X main.branch=$(BRANCH) LDFLAGS := $(LDFLAGS) -X main.commit=$(COMMIT) -X main.branch=$(BRANCH)
ifdef VERSION ifdef VERSION
LDFLAGS += -X main.version=$(VERSION) LDFLAGS += -X main.version=$(VERSION)
endif endif