mirror of
https://github.com/containers/podman.git
synced 2025-10-19 04:03:23 +08:00

Adding a patch to the bundle so that the update from previous version (v5.3.1) is a minor update, not a major one. A minor update prevents the full uninstallation of v5.3.1 and an unrequested reboot of the machine. Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
24 lines
905 B
PowerShell
24 lines
905 B
PowerShell
#!/usr/bin/env pwsh
|
|
function Get-Latest-Podman-Setup-From-GitHub {
|
|
return Get-Podman-Setup-From-GitHub "latest"
|
|
}
|
|
|
|
function Get-Podman-Setup-From-GitHub {
|
|
param(
|
|
[Parameter(Mandatory)]
|
|
[string] $version
|
|
)
|
|
|
|
Write-Host "Downloading the $version Podman windows setup from GitHub..."
|
|
$apiUrl = "https://api.github.com/repos/containers/podman/releases/$version"
|
|
$response = Invoke-RestMethod -Uri $apiUrl -Headers @{"User-Agent"="PowerShell"} -ErrorAction Stop
|
|
$downloadUrl = $response.assets[0].browser_download_url
|
|
Write-Host "Downloading URL: $downloadUrl"
|
|
$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"
|
|
return $destinationPath
|
|
}
|