Skip to content

Commit

Permalink
Stop nagging about where go is installed
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Tocker <tocker@gmail.com>
  • Loading branch information
morgo committed Nov 5, 2019
1 parent 0603e64 commit 3c9262f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
7 changes: 4 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ function fail() {

[[ "$(dirname "$0")" = "." ]] || fail "bootstrap.sh must be run from its current directory"

go version &>/dev/null || fail "Go is not installed or is not on \$PATH"
[[ "$(go version 2>&1)" =~ go1\.[1-9][1-9] ]] || fail "Go is not version 1.11+"

# Create main directories.
VTROOT="${VTROOT:-${PWD/\/src\/vitess.io\/vitess/}}"
mkdir -p "$VTROOT/dist"
mkdir -p "$VTROOT/bin"
mkdir -p "$VTROOT/lib"
Expand All @@ -53,6 +51,9 @@ else
source ./build.env
fi

go version &>/dev/null || fail "Go is not installed or is not on \$PATH"
goversion_min 1.12 || fail "Go is not version 1.12+"

if [ "$BUILD_TESTS" == 1 ] ; then
# Set up required soft links.
# TODO(mberlin): Which of these can be deleted?
Expand Down
21 changes: 0 additions & 21 deletions dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,13 @@ export PIP
command -v virtualenv2 >/dev/null && VIRTUALENV=virtualenv2 || VIRTUALENV=virtualenv
export VIRTUALENV

# Add the current GOBIN
if [ "$GOBIN" ]; then
PATH=$(prepend_path "$PATH" "$GOBIN")
fi

# Many tests rely on "go install" and assume GOBIN is really $VTROOT/bin.
# Make sure these take precedence.
GOBIN=$VTROOT/bin
export GOBIN
PATH=$(prepend_path "$PATH" "$GOBIN")

# Add chromedriver to path for Selenium tests.
PATH=$(prepend_path "$PATH" "$VTROOT/dist/chromedriver")

# Node path.
PATH=$(prepend_path "$PATH" "$VTROOT/dist/node/bin")
export PATH

# GOROOT sanity
go_bin=$(which go)
go_env=$(go env | grep GOROOT | cut -f 2 -d\")
if [[ "$go_bin" != "" && "$go_bin" != "$go_env/bin/go" ]]; then
echo "WARNING: \$GOROOT may not be compatible with the used go binary"
echo "Please make sure 'go' comes from \$GOROOT/bin"
echo "go_env: $go_env"
echo "go_bin: $go_bin"
fi

# mysql install location. Please set based on your environment.
# Build will not work if this is incorrect.

Expand Down

0 comments on commit 3c9262f

Please sign in to comment.