浏览代码

Update Makefile (#1098)

理工男 3 年之前
父节点
当前提交
8d2db09d45
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      tools/goctl/Makefile

+ 4 - 6
tools/goctl/Makefile

@@ -1,14 +1,12 @@
-version := $(shell /bin/date "+%Y-%m-%d %H:%M")
-
 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)
 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)
 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)
 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)