[windows] Add windows-11-arm64 image generation code (#13879)
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if (Test-IsArm64) {
|
||||
$pwshArch = "arm64"
|
||||
} else {
|
||||
$pwshArch = "x64"
|
||||
}
|
||||
|
||||
$tempDir = Join-Path ([System.IO.Path]::GetTempPath()) ([System.IO.Path]::GetRandomFileName())
|
||||
New-Item -ItemType Directory -Path $tempDir -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
try {
|
||||
@@ -18,7 +24,7 @@ try {
|
||||
$releases = $metadata.LTSReleaseTag -replace '^v'
|
||||
foreach ($release in $releases) {
|
||||
if ($release -like "${pwshMajorMinor}*") {
|
||||
$downloadUrl = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/PowerShell-${release}-win-x64.msi"
|
||||
$downloadUrl = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/PowerShell-${release}-win-${pwshArch}.msi"
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user