-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always get the latest version of targets #28
base: main
Are you sure you want to change the base?
Conversation
const grafanaAgentDownloadURL = "https://github.com/grafana/agent/releases/download/v0.13.1/agent-{{.OS}}-{{.Arch}}.zip" | ||
func getGrafanaDownloadURL() string { | ||
version := latest.GetLatestVersion("grafana/agent") | ||
return "https://github.com/grafana/agent/releases/download/" + version + "/agent-{{.OS}}-{{.Arch}}.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could make version a field in the URL template and have downloadBinary
extract the github project, lookup the latest version and sub it in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't make it work with templates, but regexp does the job.
9e4261a
to
8e83a43
Compare
Signed-off-by: Richard Hartmann <richih@richih.org>
8e83a43
to
07a813a
Compare
If you hammer GH API without a login too often, you will get rate limited over time. As local binaries remain on disk, this should not be too much of a concern. Signed-off-by: Richard Hartmann <richih@richih.org>
91abb5d
to
f9371b8
Compare
GH API limits are too restrictive, I will need to solve this before we can merge. |
No description provided.