Skip to content

Commit

Permalink
Merge pull request #1190 from paketo-buildpacks/new-relic-fix
Browse files Browse the repository at this point in the history
Fixes new-relic update action
  • Loading branch information
dmikusa authored Jun 27, 2023
2 parents 2123927 + 504aa52 commit 2d10979
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions actions/new-relic-dependency/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ func main() {
}
})
case "dotnet":
uri = "https://download.newrelic.com/dot_net_agent/latest_release/"
uri = "https://download.newrelic.com/dot_net_agent/previous_releases/"

cp := regexp.MustCompile(`^/dot_net_agent/latest_release/newrelic-dotnet-agent_([\d]+)\.([\d]+)\.([\d]+)_amd64.tar.gz$`)
cp := regexp.MustCompile(`^/dot_net_agent/previous_releases/([\d]+)\.([\d]+)\.([\d]+)$`)
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])
"https://download.newrelic.com%s/newrelic-dotnet-agent_%s.%s.%s_amd64.tar.gz",
h, p[1], p[2], p[3])
}
})
default:
Expand Down

0 comments on commit 2d10979

Please sign in to comment.