Skip to content

Commit

Permalink
Merge pull request #1573 from paketo-buildpacks/arm64-adoptium
Browse files Browse the repository at this point in the history
Add arm64 support to Adoptium Dependency
  • Loading branch information
anthonydahanne committed Apr 19, 2024
2 parents 5f4abb4 + dd7492a commit 9e8d48d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions actions/adoptium-dependency/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,24 @@ func main() {
panic(fmt.Errorf("version must be specified"))
}

arch, ok := inputs["arch"]
if !ok {
arch = "x64"
}

if arch == "arm64" {
arch = "aarch64" // cause Adoptium needs it this way
}

uri := fmt.Sprintf("https://api.adoptium.net/v3/assets/version/%s"+
"?architecture=x64"+
"?architecture=%s"+
"&heap_size=normal"+
"&image_type=%s"+
"&jvm_impl=%s"+
"&os=linux"+
"&release_type=ga"+
"&vendor=adoptium",
url.PathEscape(v), t, i)
url.PathEscape(v), arch, t, i)

resp, err := http.Get(uri)
if err != nil {
Expand Down

0 comments on commit 9e8d48d

Please sign in to comment.