2017-03-23 16:55:36 +03:00
|
|
|
VERSION=2.0.1
|
2017-03-23 02:13:19 +03:00
|
|
|
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/
|
2017-03-23 16:40:47 +03:00
|
|
|
go-bindata static/... templates/...
|
2017-03-23 16:33:46 +03:00
|
|
|
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
|
|
|
|
cd dist && upx --brute cowyo_linux_arm
|
2017-03-23 02:13:19 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
|