From 4f95637831e23cf6637ceb944cf1884a796b31e1 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 22 Mar 2017 17:13:19 -0600 Subject: [PATCH] Add makefile Former-commit-id: dc66526762f6a8392e48838cad1460411c3fa643 [formerly 6fa00115b96b91eafdd2f7884c6bacac6b0368e4] [formerly f0e9be4c45c1367f6229e86653357dc5a47739f8 [formerly 37bf947b79413854148359a592ac08d55c3f2150]] Former-commit-id: 612c65f57f037d23df33578b7ff392d800183647 [formerly e26be98ff430eaa0af46147f554d2139884fa959] Former-commit-id: 5320bdd630a3e5617f9c8e9db57263571599370c --- 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 + +