forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: use repository-local GOBIN for less finicky builds
This commit adjusts our Makefile to set GOBIN to $(REPO_ROOT)/bin before embarking upon a build. This has two benefits: 1. Previously, users who had set GOBIN to something other than the default $GOPATH/bin would have a broken build. We'd extend the PATH to include $GOPATH/bin, but `go install` would put binaries in $GOBIN, and later build steps would be unable to find the built tools. By forcing GOBIN to a known value in the Makefile, users can no longer break the build by having a non-default GOBIN set in their environment. 2. Since Go has a single global namespace for installed binaries (i.e., the GOBIN directory), if the user had installed a different version of one of our dependencies, or a different tool with a binary of the same name, we'd blow away that binary during our install process. Even worse, later re-installs of the other tool could blow away the version we installed without our build process noticing. Using a repository-local GOBIN solves this. Fixes cockroachdb#6886.
- Loading branch information
Showing
5 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters