Makefile rule for building all linux binaries, and upload all ARCHs

This commit is contained in:
Cameron Sparr
2015-09-04 14:12:50 -06:00
parent e47801074e
commit 6260dd1018
3 changed files with 20 additions and 4 deletions

View File

@@ -6,6 +6,17 @@ build: prepare
"-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)" \
./cmd/telegraf/telegraf.go
GOARCH=386 GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_386 \
-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)" \
./cmd/telegraf/telegraf.go
prepare:
go get github.com/tools/godep