Skip to content

Commit

Permalink
fix #254 - support arm64 in --upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
m.kindritskiy committed Jun 25, 2024
1 parent 7582cae commit ba8e0ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upgrade/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
var archAdaptMap = map[string]string{
"386": "i386",
"amd64": "x86_64",
"arm64": "arm64",
}

var osMap = map[string]string{
Expand Down Expand Up @@ -63,12 +64,12 @@ func (reg *GithubRegistry) GetDownloadURL(repoURI string, packageName string, ve
func (reg *GithubRegistry) GetPackageName(os string, arch string) (string, error) {
os = osMap[os]

arch, archExists := archAdaptMap[arch]
archAdapted, archExists := archAdaptMap[arch]
if !archExists {
return "", fmt.Errorf("arch %s is not supported", arch)
return "", fmt.Errorf("architechture '%s' is not supported", arch)
}

return fmt.Sprintf("lets_%s_%s", os, arch), nil
return fmt.Sprintf("lets_%s_%s", os, archAdapted), nil
}

func (reg *GithubRegistry) DownloadReleaseBinary(
Expand Down

0 comments on commit ba8e0ac

Please sign in to comment.