mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
4709654c4c
Former-commit-id: 9e36c6e26026b6da693e9c63665a359bd8f81132 [formerly 90d2930802e405e495c9d4f115fc96607240fa8d] [formerly 384133006e5622b83245917ca698c6678728be97 [formerly dcf6fd4e981e1eec2f77ba5e3de39ee40253d73f [formerly59036904d8
]]] Former-commit-id: 73ead65f17e5bc8e72002d3db704f31e66d4bf37 [formerly 123a60c023445bb54818026f4ea8bd8683c4846a] Former-commit-id: 8637b59aaedf6f665c581a630f8e076c2e38b735 Former-commit-id:ef0414a548
24 lines
702 B
Makefile
24 lines
702 B
Makefile
VERSION=2.0.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/
|
|
go-bindata static/... templates/...
|
|
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
|
|
|
|
|