Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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