From 37bf947b79413854148359a592ac08d55c3f2150 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 22 Mar 2017 17:13:19 -0600 Subject: [PATCH] Add makefile --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5aa6447 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +VERSION=0.1.1 +LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" + +.PHONY: build +build: + go-bindata static/... templates/... + go build + +.PHONY: release +release: + rm -rf dist/ + mkdir dist/ + env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_linux_amd64 + cd dist && upx --brute cowyo_linux_amd64 + env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_windows_amd64.exe + cd dist && upx --brute cowyo_windows_amd64.exe + env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_osx_amd64 + cd dist && upx --brute cowyo_osx_amd64 + +