fixing link: warning: option -X main.Version v0.1.8-2-g8c5e1ff may not work in future releases; use -X main.Version=v0.1.8-2-g8c5e1ff

This commit is contained in:
Roman Plessl 2015-09-10 20:33:29 +02:00
parent 8c5e1ff0a0
commit 0975bc1682
1 changed files with 4 additions and 4 deletions

View File

@ -3,18 +3,18 @@ VERSION := $(shell sh -c 'git describe --always --tags')
build: prepare
$(GOPATH)/bin/godep go build -o telegraf -ldflags \
"-X main.Version $(VERSION)" \
"-X main.Version=$(VERSION)" \
./cmd/telegraf/telegraf.go
build-linux-bins: prepare
GOARCH=amd64 GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_amd64 \
-ldflags "-X main.Version $(VERSION)" \
-ldflags "-X main.Version=$(VERSION)" \
./cmd/telegraf/telegraf.go
GOARCH=386 GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_386 \
-ldflags "-X main.Version $(VERSION)" \
-ldflags "-X main.Version=$(VERSION)" \
./cmd/telegraf/telegraf.go
GOARCH=arm GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_arm \
-ldflags "-X main.Version $(VERSION)" \
-ldflags "-X main.Version=$(VERSION)" \
./cmd/telegraf/telegraf.go
prepare: