update goctl makefile
parent
d12e9fa2d7
commit
7f0ec14704
@ -1,10 +1,14 @@
|
|||||||
version := $(shell /bin/date "+%Y-%m-%d %H:%M")
|
version := $(shell /bin/date "+%Y-%m-%d %H:%M")
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" goctl.go && upx goctl
|
go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" goctl.go
|
||||||
|
command -v upx &> /dev/null && upx goctl
|
||||||
mac:
|
mac:
|
||||||
GOOS=darwin go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-darwin goctl.go && upx goctl-darwin
|
GOOS=darwin go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-darwin goctl.go
|
||||||
|
command -v upx &> /dev/null && upx goctl-darwin
|
||||||
win:
|
win:
|
||||||
GOOS=windows go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl.exe goctl.go && upx goctl.exe
|
GOOS=windows go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl.exe goctl.go
|
||||||
|
command -v upx &> /dev/null && upx goctl.exe
|
||||||
linux:
|
linux:
|
||||||
GOOS=linux go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-linux goctl.go && upx goctl-linux
|
GOOS=linux go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-linux goctl.go
|
||||||
|
command -v upx &> /dev/null && upx goctl-linux
|
||||||
|
Loading…
Reference in New Issue