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

21 lines
460 B
PowerShell
Raw Normal View History

$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
$GoMsiVersion = "go1.22.5.windows-amd64.msi"
2024-05-07 10:19:58 +00:00
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"