diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 814b6e543..d0842cf6a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -32,6 +32,7 @@ builds: - arm - ppc64le - s390x + - riscv64 hooks: post: - ./ci/script.sh compress_binary {{ .Path }} {{ .Arch }} @@ -57,6 +58,7 @@ builds: - arm - ppc64le - s390x + - riscv64 hooks: post: - ./ci/script.sh compress_binary {{ .Path }} {{ .Arch }} diff --git a/agent/app/service/snapshot.go b/agent/app/service/snapshot.go index 486a82a76..1603fa9b7 100644 --- a/agent/app/service/snapshot.go +++ b/agent/app/service/snapshot.go @@ -169,7 +169,8 @@ func hasOs(name string) bool { strings.Contains(name, "arm64") || strings.Contains(name, "armv7") || strings.Contains(name, "ppc64le") || - strings.Contains(name, "s390x") + strings.Contains(name, "s390x") || + strings.Contains(name, "riscv64") } func loadOs() string { diff --git a/core/app/service/upgrade.go b/core/app/service/upgrade.go index 51df1b7b0..4716685f7 100644 --- a/core/app/service/upgrade.go +++ b/core/app/service/upgrade.go @@ -403,5 +403,8 @@ func loadArch() (string, error) { if strings.Contains(std, "s390x") { return "s390x", nil } + if strings.Contains(std, "riscv64") { + return "riscv64", nil + } return "", fmt.Errorf("unsupported such arch: %s", std) } diff --git a/core/utils/common/common.go b/core/utils/common/common.go index 7e96a7a3b..77b89873a 100644 --- a/core/utils/common/common.go +++ b/core/utils/common/common.go @@ -150,6 +150,9 @@ func LoadArchWithStdout(std string) (string, error) { if strings.Contains(std, "s390x") { return "s390x", nil } + if strings.Contains(std, "riscv64") { + return "riscv64", nil + } return "", fmt.Errorf("unsupported such arch: %s", std) }