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:
|
2018-01-18 09:04:44 +03:00
|
|
|
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:
|
2018-01-18 09:04:44 +03:00
|
|
|
go-bindata static/... templates/...
|
2017-11-02 15:27:39 +03:00
|
|
|
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
|
|
|
|
2017-11-05 16:35:11 +03:00
|
|
|
.PHONY: linux32
|
|
|
|
linux32:
|
|
|
|
env GOOS=linux GOARCH=386 go build ${LDFLAGS} -o dist/cowyo_linux_32bit
|
2018-01-27 12:27:33 +03:00
|
|
|
#cd dist && upx --brute cowyo_linux_32bit
|
2017-11-05 16:35:11 +03:00
|
|
|
|
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-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
|
2017-11-05 16:35:11 +03:00
|
|
|
release: osx windows linux64 linux32 linuxarm
|