[windows] pin pwsh in toolset (#9072)

This commit is contained in:
Mikhail Koliada
2023-12-28 11:18:57 +01:00
committed by GitHub
parent e9057a22fc
commit 34b6b3172f
3 changed files with 15 additions and 2 deletions

View File

@@ -13,8 +13,15 @@ try {
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
$metadata = Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json
$release = $metadata.LTSReleaseTag[0] -replace '^v'
$downloadUrl = "https://github.com/PowerShell/PowerShell/releases/download/v${release}/PowerShell-${release}-win-x64.msi"
$pwshMajorMinor = (Get-ToolsetContent).pwsh.version
$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"
break
}
}
$installerName = Split-Path $downloadUrl -Leaf
$externalHash = Get-ChecksumFromUrl -Type "SHA256" `

View File

@@ -491,5 +491,8 @@
},
"openssl": {
"version": "1.1.1"
},
"pwsh": {
"version": "7.2"
}
}

View File

@@ -431,5 +431,8 @@
},
"openssl": {
"version": "1.1.1"
},
"pwsh": {
"version": "7.2"
}
}