1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile
Zack Scholl cc04599b6f Update bindata on Makefile
Former-commit-id: eb5f6d3dcc38157ddff43ab777962555c20d2b16 [formerly 4d02759fbb3a7f208a178c0cd797437300b9feb0] [formerly d68e70cde8da577d49b4ec1116c7948e792d80c0 [formerly 98d57a49c87b73fd59680fda968e16b2a4a94296 [formerly 8f76fbecf4]]]
Former-commit-id: 75cf27c8d4bb198da60f59548a3ed846c8529c7d [formerly e05a48d24612a7bd8994e7c51d68ee2ca46e8736]
Former-commit-id: 530053a77d420a205f65fd9ead96b656b523b766
Former-commit-id: 72b285671b
2017-03-23 07:40:47 -06:00

24 lines
702 B
Makefile

VERSION=2.0.0
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/
go-bindata static/... templates/...
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
cd dist && upx --brute cowyo_linux_arm
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