Skip to content

Commit

Permalink
install go 1.14 on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoe committed Jul 20, 2020
1 parent b63b74a commit 23487cc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ orbs:
win: circleci/windows@2.2.0

commands:
win_install_go:
steps:
- run: .\scripts\install_go.ps1
go_build:
steps:
- run: go build ./...
Expand All @@ -16,12 +19,14 @@ jobs:
executor:
name: win/default
steps:
- win_install_go
- checkout
- go_build
wintest:
executor:
name: win/default
steps:
- win_install_go
- checkout
- go_test

Expand Down
13 changes: 13 additions & 0 deletions scripts/install_go.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Download the file to a specific location
$clnt = new-object System.Net.WebClient
$url = "https://golang.org/dl/go1.14.6.windows-amd64.zip"
$file = "c:\go.zip"
$clnt.DownloadFile($url,$file)

# Unzip the file to specified location
$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace($file)
$destination = $shell_app.namespace("c:\Go")
$destination.Copyhere($zip_file.items())

$env:Path += ";c:\Go\bin"

0 comments on commit 23487cc

Please # to comment.