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