Fix windows arm64 installer build

This is a followup of https://github.com/containers/podman/pull/26048

It fixes `process-release.ps1` that was always looking for the amd64 release
zip file, even if `$env:PODMAN_ARCH` was set to arm64. With this fix it looks
for the right zip file.

It fixes `winmake.ps1` that, when the `-arch` param was not passed, set `$env:PODMAN_ARCH`
to the empty string instead of the local `$env:GOARCH`.

Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
Mario Loriedo
2025-05-07 14:55:48 +02:00
parent 0dd745c86b
commit 04ee90dab3
3 changed files with 9 additions and 4 deletions

View File

@ -105,7 +105,7 @@ if ($ENV:INSTVER -eq "") {
}
$installerPlatform = ""
if ($null -eq $ENV:PODMAN_ARCH -or $ENV:PODMAN_ARCH -eq "amd64") {
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH -or "amd64" -eq $ENV:PODMAN_ARCH) {
$installerPlatform = "x64"
} elseif ($ENV:PODMAN_ARCH -eq "arm64") {
$installerPlatform = "arm64"

View File

@ -97,10 +97,14 @@ try {
$restore = 1
$ProgressPreference = 'SilentlyContinue';
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH ) {
Write-Warning "PODMAN_ARCH not set, defaulting to amd64"
$ENV:PODMAN_ARCH = "amd64"
}
if ($releaseDir.Length -gt 0) {
Copy-Item -Path "$releaseDir/podman-remote-release-windows_amd64.zip" "release.zip"
Copy-Item -Path "$releaseDir/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
} else {
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_amd64.zip" "release.zip"
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
DownloadOptional "$base_url/releases/download/$version/shasums" ..\shasums
}
Expand-Archive -Path release.zip

View File

@ -14,6 +14,7 @@ param (
Write-Warning "Unsupported architecture $arch. Using default ($defaultArchitecture)."
return $defaultArchitecture
}
return $arch
),
[parameter(ValueFromRemainingArguments)][object[]]$params = @()
)
@ -108,7 +109,7 @@ function Installer{
[string]$version,
[string]$suffix = "dev"
);
Write-Host "Building the windows installer"
Write-Host "Building the windows installer for $architecture"
# Check for the files to include in the installer
$requiredArtifacts = @(