2017-03-23 23:37:47 +03:00
|
|
|
# Make a release with
|
|
|
|
# make -j4 release
|
|
|
|
|
|
|
|
VERSION=$(shell git describe)
|
2017-10-11 07:26:33 +03:00
|
|
|
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -a -installsuffix cgo
|
2017-03-23 02:13:19 +03:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
go-bindata static/... templates/...
|
2017-03-28 17:08:29 +03:00
|
|
|
go build ${LDFLAGS}
|
2017-03-23 02:13:19 +03:00
|
|
|
|
2017-11-02 15:27:39 +03:00
|
|
|
.PHONY: quick
|
|
|
|
quick:
|
|
|
|
go-bindata static/... templates/...
|
|
|
|
go build
|
|
|
|
|
2017-03-23 23:37:47 +03:00
|
|
|
.PHONY: linuxarm
|
|
|
|
linuxarm:
|
2017-03-23 16:33:46 +03:00
|
|
|
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
|
2017-08-18 17:05:10 +03:00
|
|
|
#cd dist && upx --brute cowyo_linux_arm
|
2017-03-23 23:37:47 +03:00
|
|
|
|
|
|
|
.PHONY: linux64
|
|
|
|
linux64:
|
2017-03-23 02:13:19 +03:00
|
|
|
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_linux_amd64
|
2017-08-18 17:05:10 +03:00
|
|
|
#cd dist && upx --brute cowyo_linux_amd64
|
2017-03-23 23:37:47 +03:00
|
|
|
|
|
|
|
.PHONY: windows
|
|
|
|
windows:
|
2017-03-23 02:13:19 +03:00
|
|
|
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_windows_amd64.exe
|
2017-08-18 17:05:10 +03:00
|
|
|
#cd dist && upx --brute cowyo_windows_amd64.exe
|
2017-03-23 23:37:47 +03:00
|
|
|
|
|
|
|
.PHONY: osx
|
|
|
|
osx:
|
2017-03-23 02:13:19 +03:00
|
|
|
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_osx_amd64
|
2017-08-18 17:05:10 +03:00
|
|
|
#cd dist && upx --brute cowyo_osx_amd64
|
2017-03-23 02:13:19 +03:00
|
|
|
|
2017-03-23 23:37:47 +03:00
|
|
|
.PHONY: release
|
|
|
|
release: osx windows linux64 linuxarm
|
|
|
|
|
2017-03-23 02:13:19 +03:00
|
|
|
|