Update Makefile (#1098)
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
version := $(shell /bin/date "+%Y-%m-%d %H:%M")
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" goctl.go
|
go build -ldflags="-s -w" goctl.go
|
||||||
$(if $(shell command -v upx), upx goctl)
|
$(if $(shell command -v upx), upx goctl)
|
||||||
mac:
|
mac:
|
||||||
GOOS=darwin go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-darwin goctl.go
|
GOOS=darwin go build -ldflags="-s -w" -o goctl-darwin goctl.go
|
||||||
$(if $(shell command -v upx), upx goctl-darwin)
|
$(if $(shell command -v upx), upx goctl-darwin)
|
||||||
win:
|
win:
|
||||||
GOOS=windows go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl.exe goctl.go
|
GOOS=windows go build -ldflags="-s -w" -o goctl.exe goctl.go
|
||||||
$(if $(shell command -v upx), upx goctl.exe)
|
$(if $(shell command -v upx), upx goctl.exe)
|
||||||
linux:
|
linux:
|
||||||
GOOS=linux go build -ldflags="-s -w" -ldflags="-X 'main.BuildTime=$(version)'" -o goctl-linux goctl.go
|
GOOS=linux go build -ldflags="-s -w" -o goctl-linux goctl.go
|
||||||
$(if $(shell command -v upx), upx goctl-linux)
|
$(if $(shell command -v upx), upx goctl-linux)
|
||||||
|
|||||||
Reference in New Issue
Block a user