mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Makefile works in parallel
Former-commit-id: 0e8b4a8544a37d5ba70b5105972af6f682121fe2 [formerly b27e6f754cf6267f4d9b24e4e16d719b1b58ac3a] [formerly 643edb8efb9bb54ffe343f6d8e09d70277ba8880 [formerly d064c67547da6da2f97431f2962dd6a6f81cb8ce]]
Former-commit-id: de0f0fadefb349b5fef99655c574515dde046c44 [formerly 471f13c019582eff335fef36b8602308e9bfd06d]
Former-commit-id: db630b02ebee07b2f95eff560f6ff0e74152413e
Former-commit-id: ebfdb06f25
This commit is contained in:
parent
97bfc15692
commit
a78468e086
24
Makefile
24
Makefile
@ -1,4 +1,7 @@
|
|||||||
VERSION=2.0.1
|
# Make a release with
|
||||||
|
# make -j4 release
|
||||||
|
|
||||||
|
VERSION=$(shell git describe)
|
||||||
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}"
|
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}"
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
@ -6,18 +9,27 @@ build:
|
|||||||
go-bindata static/... templates/...
|
go-bindata static/... templates/...
|
||||||
go build
|
go build
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: linuxarm
|
||||||
release:
|
linuxarm:
|
||||||
rm -rf dist/
|
|
||||||
mkdir dist/
|
|
||||||
go-bindata static/... templates/...
|
|
||||||
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
|
env GOOS=linux GOARCH=arm go build ${LDFLAGS} -o dist/cowyo_linux_arm
|
||||||
cd dist && upx --brute cowyo_linux_arm
|
cd dist && upx --brute cowyo_linux_arm
|
||||||
|
|
||||||
|
.PHONY: linux64
|
||||||
|
linux64:
|
||||||
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_linux_amd64
|
env GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_linux_amd64
|
||||||
cd dist && upx --brute cowyo_linux_amd64
|
cd dist && upx --brute cowyo_linux_amd64
|
||||||
|
|
||||||
|
.PHONY: windows
|
||||||
|
windows:
|
||||||
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_windows_amd64.exe
|
env GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_windows_amd64.exe
|
||||||
cd dist && upx --brute cowyo_windows_amd64.exe
|
cd dist && upx --brute cowyo_windows_amd64.exe
|
||||||
|
|
||||||
|
.PHONY: osx
|
||||||
|
osx:
|
||||||
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_osx_amd64
|
env GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o dist/cowyo_osx_amd64
|
||||||
cd dist && upx --brute cowyo_osx_amd64
|
cd dist && upx --brute cowyo_osx_amd64
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
|
release: osx windows linux64 linuxarm
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user