Skip to content

Commit

Permalink
Add ARM64 update support for YourKit updater
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Mikusa <dan@mikusa.com>
  • Loading branch information
dmikusa committed May 22, 2024
1 parent e1b08c8 commit 4c93038
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion actions/yourkit-dependency/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ import (
func main() {
inputs := actions.NewInputs()

arch, ok := inputs["arch"]
if !ok || (arch != "arm64" && arch != "x64") {
panic(fmt.Errorf("arch must be specified [arm64, x64]"))
}

c := colly.NewCollector()

cp := regexp.MustCompile(`(?s)Version: ([\d]+)\.([\d]+).*Build: #([\d]+)`)
Expand All @@ -37,7 +42,7 @@ func main() {
v := fmt.Sprintf("%s.%s.%s", p[1], p[2], p[3])

versions[v] = fmt.Sprintf(
"https://download.yourkit.com/yjp/%s.%s/YourKit-JavaProfiler-%s.%s-b%s-x64.zip", p[1], p[2], p[1], p[2], p[3])
"https://download.yourkit.com/yjp/%s.%s/YourKit-JavaProfiler-%s.%s-b%s-%s.zip", p[1], p[2], p[1], p[2], p[3], arch)
}
})

Expand Down

0 comments on commit 4c93038

Please sign in to comment.