Skip to content

Commit

Permalink
Windows - Pin Grafana Agent version to 0.39.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LMarkie committed Feb 19, 2024
1 parent 65194e4 commit 645041b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions windows/observability-agent-autoconf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,12 @@ while ($args) {
}

if ($INSTALL -ne $false) {

$uri = "https://api.github.com/repos/grafana/agent/releases/latest"
$release = Invoke-RestMethod -Uri $uri

# Extract the download URL for the Windows installer from the release assets
$url = ($release.assets | Where-Object { $_.name -like "grafana-agent-flow-installer.exe.zip" }).browser_download_url

$outputPath = "$PSScriptRoot/grafana-agent-flow-installer.exe.zip"
$installPath = "$PSScriptRoot/grafana-agent-flow-installer.exe"

# Download the file
Write-Output "Downloading agent installer"
Invoke-WebRequest -Uri $url -OutFile $outputPath
Invoke-WebRequest -Uri "https://github.com/grafana/agent/releases/download/v0.39.2/grafana-agent-flow-installer.exe.zip" -OutFile $outputPath

# Extract the contents of the zip file
Write-Output "Extracting agent installer"
Expand Down

0 comments on commit 645041b

Please sign in to comment.