Skip to content

Instantly share code, notes, and snippets.

@ryandanthony
Forked from kameshsampath/getLatestIstio.ps1
Created October 14, 2019 15:56
Show Gist options
  • Save ryandanthony/3cc72ed1768f291c6ff1209eedf51233 to your computer and use it in GitHub Desktop.
Save ryandanthony/3cc72ed1768f291c6ff1209eedf51233 to your computer and use it in GitHub Desktop.
The PowerShell script that can be used to download latest version of Istio analogus to https://git.io/getLatestIstio (fixed)
param(
[string] $IstioVersion = "1.3.2"
)
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$url = "https://github.com/istio/istio/releases/download/$($IstioVersion)/istio-$($IstioVersion)-win.zip"
$Path = Get-Location
$output = [IO.Path]::Combine($Path, "istio_$($IstioVersion)_win.zip")
Write-Host "Downloading Istio from $url to path " $Path -ForegroundColor Green
#Download file
(New-Object System.Net.WebClient).DownloadFile($url, $output)
# Unzip the Archive
Expand-Archive $output -DestinationPath $Path
#Set the environment variable
$IstioHome = [IO.Path]::Combine($Path, "istio-$($IstioVersion)")
[Environment]::SetEnvironmentVariable("ISTIO_HOME", "$IstioHome", "User")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment