Skip to content

Commit 35e1c20

Browse files
committed
Fix windows arm64 installer build
This is a followup of #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 <[email protected]>
1 parent ebbf90d commit 35e1c20

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

contrib/win-installer/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ if ($ENV:INSTVER -eq "") {
105105
}
106106

107107
$installerPlatform = ""
108-
if ($null -eq $ENV:PODMAN_ARCH -or $ENV:PODMAN_ARCH -eq "amd64") {
108+
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH -or "amd64" -eq $ENV:PODMAN_ARCH) {
109109
$installerPlatform = "x64"
110110
} elseif ($ENV:PODMAN_ARCH -eq "arm64") {
111111
$installerPlatform = "arm64"

contrib/win-installer/process-release.ps1

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,14 @@ try {
9797
$restore = 1
9898
$ProgressPreference = 'SilentlyContinue';
9999

100+
if ($null -eq $ENV:PODMAN_ARCH -or "" -eq $ENV:PODMAN_ARCH ) {
101+
Write-Warning "PODMAN_ARCH not set, defaulting to amd64"
102+
$ENV:PODMAN_ARCH = "amd64"
103+
}
100104
if ($releaseDir.Length -gt 0) {
101-
Copy-Item -Path "$releaseDir/podman-remote-release-windows_amd64.zip" "release.zip"
105+
Copy-Item -Path "$releaseDir/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
102106
} else {
103-
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_amd64.zip" "release.zip"
107+
DownloadOrSkip "$base_url/releases/download/$version/podman-remote-release-windows_${ENV:PODMAN_ARCH}.zip" "release.zip"
104108
DownloadOptional "$base_url/releases/download/$version/shasums" ..\shasums
105109
}
106110
Expand-Archive -Path release.zip

winmake.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ param (
1414
Write-Warning "Unsupported architecture $arch. Using default ($defaultArchitecture)."
1515
return $defaultArchitecture
1616
}
17+
return $arch
1718
),
1819
[parameter(ValueFromRemainingArguments)][object[]]$params = @()
1920
)
@@ -108,7 +109,7 @@ function Installer{
108109
[string]$version,
109110
[string]$suffix = "dev"
110111
);
111-
Write-Host "Building the windows installer"
112+
Write-Host "Building the windows installer for $architecture"
112113

113114
# Check for the files to include in the installer
114115
$requiredArtifacts = @(

0 commit comments

Comments
 (0)