1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Add makefile

Former-commit-id: dc66526762f6a8392e48838cad1460411c3fa643 [formerly 6fa00115b96b91eafdd2f7884c6bacac6b0368e4] [formerly f0e9be4c45c1367f6229e86653357dc5a47739f8 [formerly be99f99ab97119871abfbe954e612f534ad35b27 [formerly 37bf947b79]]]
Former-commit-id: 612c65f57f037d23df33578b7ff392d800183647 [formerly e26be98ff430eaa0af46147f554d2139884fa959]
Former-commit-id: 5320bdd630a3e5617f9c8e9db57263571599370c
Former-commit-id: 4f95637831
This commit is contained in:
Zack Scholl 2017-03-22 17:13:19 -06:00
parent 328e177b66
commit 12d447ed74

20
Makefile Normal file
View File

@ -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