From ab468b84fddd4d016f52fb513e32ea4c7c105528 Mon Sep 17 00:00:00 2001 From: Thomas Bennett Date: Thu, 31 Oct 2019 10:23:58 -0700 Subject: [PATCH] tweak Readme --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 1759b03..97f20dd 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +PLATFORMS := linux/amd64 windows/amd64 darwin/amd64 linux/arm64 + +temp = $(subst /, ,$@) +os = $(word 1, $(temp)) +arch = $(word 2, $(temp)) + defualt: build build: @@ -5,3 +11,8 @@ build: install: GO111MODULE=on go install -o sia_exporter *.go + +release: $(PLATFORMS) + +$(PLATFORMS): + GO111MODULE=on GOOS=$(os) GOARCH=$(arch) go build -o 'sia_exporter-$(os)-$(arch)' *.go