From d1851f3e9c99e0a2840107620d2116a2dbb656b6 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Wed, 6 May 2015 14:41:08 -0600 Subject: [PATCH] Makefile --- Makefile | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 8b656b6..d6ce45d 100644 --- a/Makefile +++ b/Makefile @@ -3,18 +3,25 @@ GOLDFLAGS="-X main.version $(VERSION)" default: +bin: + mkdir -p bin + rm -rf bin/* + release: release-windows release-darwin release-linux -release-windows: - mkdir -p bin/windows/amd64 - GOOS=windows GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/windows/amd64/ego ./cmd/ego +release-windows: bin + GOOS=windows GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/ego ./cmd/ego + cd bin && tar -cvzf ego$(VERSION).windows-amd64.tgz ego + rm bin/ego -release-darwin: - mkdir -p bin/darwin/amd64 - GOOS=darwin GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/darwin/amd64/ego ./cmd/ego +release-darwin: bin + GOOS=darwin GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/ego ./cmd/ego + cd bin && tar -cvzf ego$(VERSION).darwin-amd64.tgz ego + rm bin/ego -release-linux: - mkdir -p bin/linux/amd64 - GOOS=linux GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/linux/amd64/ego ./cmd/ego +release-linux: bin + GOOS=linux GOARCH=amd64 go build -ldflags=$(GOLDFLAGS) -o bin/ego ./cmd/ego + cd bin && tar -cvzf ego$(VERSION).linux-amd64.tgz ego + rm bin/ego -.PHONY: default release +.PHONY: bin default release