From 184f62be62de8f5d7a6179b3f323d32ef1eecfe1 Mon Sep 17 00:00:00 2001 From: "Eric J. Holmes" Date: Mon, 12 Jun 2017 10:02:53 -0700 Subject: [PATCH] Build linux, darwin and windows binaries --- Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ecc757e..7e1ab41 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,19 @@ +.PHONY: test clean bin + bin/assume-role: *.go - go build -o bin/assume-role . + go build -o $@ . + +bin: bin/assume-role-Linux bin/assume-role-Darwin bin/assume-role-Windows.exe + +bin/assume-role-Linux: *.go + env GOOS=linux go build -o $@ . +bin/assume-role-Darwin: *.go + env GOOS=darwin go build -o $@ . +bin/assume-role-Windows.exe: *.go + env GOOS=windows go build -o $@ . + +clean: + rm -rf bin/* test: go test -race $(shell go list ./... | grep -v /vendor/)