cloudflared-mirror/.teamcity/windows/install-go-msi.ps1

20 lines
459 B
PowerShell
Raw Normal View History

$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
2024-05-07 10:19:58 +00:00
$GoMsiVersion = "go1.22.2.windows-amd64.msi"
Write-Output "Downloading go installer..."
2024-05-07 10:19:58 +00:00
Set-Location "$Env:Temp"
2024-05-07 10:19:58 +00:00
(New-Object System.Net.WebClient).DownloadFile(
"https://go.dev/dl/$GoMsiVersion",
"$Env:Temp\$GoMsiVersion"
)
2024-05-07 10:19:58 +00:00
Write-Output "Installing go..."
Install-Package "$Env:Temp\$GoMsiVersion" -Force
2024-05-07 10:19:58 +00:00
# Go installer updates global $PATH
go env
2024-05-07 10:19:58 +00:00
Write-Output "Installed"