feat(agent): ARM 实验性支持-未测试

This commit is contained in:
naiba 2020-12-21 19:14:50 +08:00
parent 4ec61d0043
commit a203580ecf
2 changed files with 34 additions and 2 deletions

View File

@ -9,6 +9,28 @@ builds:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- 386
- arm
- mips
- mips64
ignore:
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm
- goos: darwin
goarch: mips
- goos: darwin
goarch: mips64
- goos: windows
goarch: arm
- goos: windows
goarch: mips
- goos: windows
goarch: mips64
main: ./cmd/agent
binary: nezha-agent
checksum:

View File

@ -75,10 +75,20 @@ pre_check() {
fi
## os_arch
if [ $(uname -m | grep '64') != "" ]; then
if [ $(uname -m | grep 'x86_64') != "" ]; then
os_arch="amd64"
else
elif [ $(uname -m | grep 'i686') != "" ]; then
os_arch="amd64"
elif [ $(uname -m | grep 'i386') != "" ]; then
os_arch="386"
elif [ $(uname -m | grep 'aarch64') != "" ]; then
os_arch="arm64"
elif [ $(uname -m | grep 'armv8b') != "" ]; then
os_arch="arm64"
elif [ $(uname -m | grep 'armv8l') != "" ]; then
os_arch="arm64"
elif [ $(uname -m | grep 'arm') != "" ]; then
os_arch="arm"
fi
## server location