1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/Makefile
Zack Scholl d247846934 Add ARM to makefile
Former-commit-id: a4ad6c9c132f48b5f679f973a0c80db923765156 [formerly 0635361632881f2e831e3ecea20134df27838d9e] [formerly 2d91ad2c4766984722e88d20275d0105218b1145 [formerly 2549aac8215b9213a2f8c7b9387f3081a5c1bc04 [formerly 2a2570835d]]]
Former-commit-id: d5459ec2b879c7b5ea69361643fdc6e1a5857114 [formerly 63abe22d8706168f9a7f035f53585d7d58b654f3]
Former-commit-id: 2326e71c3063d2bbee54839dadd8c57484a90835
Former-commit-id: cf04407182
2017-03-23 07:33:46 -06:00

23 lines
664 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/
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