vitess.io/vitess@v0.16.2/build.env (about) 1 # No shebang line as this script is sourced from an external shell. 2 3 # Copyright 2019 The Vitess Authors. 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 source ./tools/shell_functions.inc 18 19 go version >/dev/null 2>&1 || fail "Go is not installed or is not in \$PATH. See https://vitess.io/contributing/build-from-source for install instructions." 20 goversion_min 1.20.3 || echo "Go version reported: `go version`. Version 1.20.3+ recommended. See https://vitess.io/contributing/build-from-source for install instructions." 21 22 mkdir -p dist 23 mkdir -p bin 24 mkdir -p lib 25 mkdir -p vthook 26 27 export VTROOT="$PWD" 28 export VTDATAROOT="${VTDATAROOT:-${VTROOT}/vtdataroot}" 29 export PATH="$PWD/bin:$PATH" 30 31 mkdir -p "$VTDATAROOT" 32 33 # Set up required soft links. 34 # TODO(mberlin): Which of these can be deleted? 35 ln -snf "$PWD/go/vt/zkctl/zksrv.sh" bin/zksrv.sh 36 ln -snf "$PWD/test/vthook-test.sh" vthook/test.sh 37 38 # install git hooks 39 40 mkdir -p .git/hooks 41 ln -sf "$PWD/misc/git/pre-commit" .git/hooks/pre-commit 42 ln -sf "$PWD/misc/git/commit-msg" .git/hooks/commit-msg 43 git config core.hooksPath .git/hooks 44 export EXTRA_BIN=$PWD/test/bin