mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-06 14:44:42 +08:00
feat: support riscv64 (#9925)
* feat: add riscv64 * feat: correct arch related codes
This commit is contained in:
parent
2be7054b40
commit
1759c2c81e
4 changed files with 10 additions and 1 deletions
|
@ -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 }}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue