There was an error while loading. Please reload this page.
1 parent 581b6ed commit 9ce548cCopy full SHA for 9ce548c
1 file changed
go-client/Makefile
@@ -9,9 +9,9 @@ LDFLAGS=-w -s
9
10
CLIENTBUILD=CGO_ENABLED=0 go build -trimpath
11
12
-# 自动检测当前平台
13
-CURRENT_OS := $(shell go env GOOS)
14
-CURRENT_ARCH := $(shell go env GOARCH)
+# 自动检测当前平台 - 使用 shell 命令,不依赖 Go 环境
+CURRENT_OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
+CURRENT_ARCH := $(shell uname -m | sed 's/x86_64/amd64/; s/aarch64/arm64/; s/arm64/arm64/')
15
16
# 默认目标:构建并安装当前平台
17
.PHONY: default
0 commit comments