mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Add makefile
This commit is contained in:
parent
0a3184b190
commit
37bf947b79
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
VERSION=0.1.1
|
||||
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=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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user