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 <johnstep@docker.com>
This commit is contained in:
John Stephens 2017-05-16 12:13:28 -07:00
parent ad846a136a
commit eab0f58661
No known key found for this signature in database
GPG Key ID: 240549B2101E94D4
1 changed files with 3 additions and 1 deletions

View File

@ -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 $_