From 82ea511a859f4c4fd338abf0e9d97f34e7b0af73 Mon Sep 17 00:00:00 2001 From: Mario Loriedo Date: Thu, 5 Dec 2024 15:21:43 +0100 Subject: [PATCH] Revert "win-installer test: revert to v5.3.0" This reverts commit 916b805f9776d721aaba9972685d786d0e48624a. --- contrib/win-installer/test-installer.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contrib/win-installer/test-installer.ps1 b/contrib/win-installer/test-installer.ps1 index 220e01348a..2110812d8b 100644 --- a/contrib/win-installer/test-installer.ps1 +++ b/contrib/win-installer/test-installer.ps1 @@ -221,11 +221,13 @@ function Remove-Podman-Machine-Conf { } function Get-Latest-Podman-Setup-From-GitHub { - $tag = "5.3.0" - Write-Host "Downloading the $tag Podman windows setup from GitHub..." - $downloadUrl = "https://github.com/containers/podman/releases/download/v$tag/podman-$tag-setup.exe" + Write-Host "Downloading the latest Podman windows setup from GitHub..." + $apiUrl = "https://api.github.com/repos/containers/podman/releases/latest" + $response = Invoke-RestMethod -Uri $apiUrl -Headers @{"User-Agent"="PowerShell"} -ErrorAction Stop + $downloadUrl = $response.assets[0].browser_download_url Write-Host "Downloading URL: $downloadUrl" - $destinationPath = "$PSScriptRoot\podman-$tag-setup.exe" + $latestTag = $response.tag_name + $destinationPath = "$PSScriptRoot\podman-$latestTag-setup.exe" Write-Host "Destination Path: $destinationPath" Invoke-WebRequest -Uri $downloadUrl -OutFile $destinationPath Write-Host "Command completed successfully!`n"