mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-10 13:23:29 +00:00
default CI/Install-PowerShell version to stable release
This commit is contained in:
@@ -6,11 +6,15 @@
|
|||||||
Param
|
Param
|
||||||
(
|
(
|
||||||
# Version to install in the format from the .msi, for example "7.0.0-preview.1"
|
# Version to install in the format from the .msi, for example "7.0.0-preview.1"
|
||||||
[Parameter(Mandatory)]
|
|
||||||
[String]$Version
|
[String]$Version
|
||||||
)
|
)
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
|
|
||||||
|
if (-not $Version) {
|
||||||
|
$Version = (Invoke-RestMethod https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/metadata.json).StableReleaseTag
|
||||||
|
}
|
||||||
|
$Version = $Version -replace "^v",""
|
||||||
|
|
||||||
'[Progress] Downloading PowerShell Core.'
|
'[Progress] Downloading PowerShell Core.'
|
||||||
$MsiPath = Join-Path $env:TEMP "PowerShell-$Version-win-x64.msi"
|
$MsiPath = Join-Path $env:TEMP "PowerShell-$Version-win-x64.msi"
|
||||||
[System.Net.WebClient]::new().DownloadFile("https://github.com/PowerShell/PowerShell/releases/download/v$Version/PowerShell-$Version-win-x64.msi", $MsiPath)
|
[System.Net.WebClient]::new().DownloadFile("https://github.com/PowerShell/PowerShell/releases/download/v$Version/PowerShell-$Version-win-x64.msi", $MsiPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user