From eab0f58661640d4309765755944dc26871f7bb59 Mon Sep 17 00:00:00 2001 From: John Stephens Date: Tue, 16 May 2017 12:13:28 -0700 Subject: [PATCH] Ensure the correct Windows client is built This script builds the client by cloning the repository to a temporary location and building from there by temporarily changing GOPATH. However, it was previously building by package name, and a package with the same name in GOROOT overrides. This update changes the current directory, and builds from there, instead of specifying a package name. Signed-off-by: John Stephens --- hack/make.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hack/make.ps1 b/hack/make.ps1 index 99df626674..876c60fb0b 100644 --- a/hack/make.ps1 +++ b/hack/make.ps1 @@ -418,8 +418,10 @@ Try { Invoke-Expression "git -C $dockerCliRoot checkout -q $dockerCliCommit" if ($LASTEXITCODE -ne 0) { Throw "Failed to checkout client commit $dockerCliCommit" } Write-Host "INFO: Building client..." - Invoke-Expression "go build -o $root\bundles\docker.exe github.com/docker/cli/cmd/docker" + Push-Location "$dockerCliRoot\cmd\docker"; $global:pushed=$True + Invoke-Expression "go build -o $root\bundles\docker.exe" if ($LASTEXITCODE -ne 0) { Throw "Failed to compile client" } + Pop-Location; $global:pushed=$False } Catch [Exception] { Throw $_