Skip to content

Commit

Permalink
Merge pull request #597 from JordyBaylac/master
Browse files Browse the repository at this point in the history
chore(release): fix windows installer release url
  • Loading branch information
eysi09 authored Mar 6, 2019
2 parents 2ea4a98 + d6f4c1c commit b03582d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions support/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ md -Force $gardenHomePath | Out-Null
md -Force $gardenBinPath | Out-Null
md -Force $gardenTmpPath | Out-Null

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# Download and extract the archive to $gardenBinPath
$latestRelease = Invoke-WebRequest "https://github.com/garden-io/releases/latest" -Headers @{"Accept"="application/json"}
$latestRelease = Invoke-WebRequest "https://github.com/garden-io/garden/releases/latest" -Headers @{"Accept"="application/json"}
# The releases are returned in the format {"id":3622206,"tag_name":"hello-1.0.0.11",...}, we have to extract the tag_name.
$json = $latestRelease.Content | ConvertFrom-Json
$latestVersion = $json.tag_name
Expand All @@ -138,7 +140,7 @@ if (-not ([Net.ServicePointManager]::SecurityProtocol).ToString().Contains([Net.

Write-Host "-> Extracting archive..."
Expand-Archive $zipPath -DestinationPath $gardenTmpPath -Force
Copy-Item -Force -Recurse -Path "$gardenTmpPath/win-amd64/*" -Destination $gardenBinPath
Copy-Item -Force -Recurse -Path "$gardenTmpPath/windows-amd64/*" -Destination $gardenBinPath

# Make sure $gardenBinPath is in the user's PATH
if (!($env:path.ToLower() -like "*$gardenBinPath*".ToLower())) {
Expand Down

0 comments on commit b03582d

Please sign in to comment.