Skip to content

Commit

Permalink
Add dotnet new-relic agent support (#1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivotal-david-osullivan authored Jun 23, 2023
1 parent f8171f6 commit 2123927
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions actions/new-relic-dependency/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ func main() {
h, p[1], p[2], p[3], p[4])
}
})
case "dotnet":
uri = "https://download.newrelic.com/dot_net_agent/latest_release/"

cp := regexp.MustCompile(`^/dot_net_agent/latest_release/newrelic-dotnet-agent_([\d]+)\.([\d]+)\.([\d]+)_amd64.tar.gz$`)
c.OnHTML("a[href]", func(element *colly.HTMLElement) {
h := element.Attr("href")
if p := cp.FindStringSubmatch(h); p != nil {
v := fmt.Sprintf("%s.%s.%s", p[1], p[2], p[3])

versions[v] = fmt.Sprintf(
"https://download.newrelic.com/dot_net_agent/latest_release/newrelic-dotnet-agent_%s.%s.%s_amd64.tar.gz",
p[1], p[2], p[3])
}
})
default:
panic(fmt.Errorf("unsupported type %s", t))
}
Expand Down

0 comments on commit 2123927

Please sign in to comment.