-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathbuild.env
More file actions
executable file
·51 lines (41 loc) · 1.85 KB
/
build.env
File metadata and controls
executable file
·51 lines (41 loc) · 1.85 KB
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
50
51
# 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.26.1 || echo "Go version reported: `go version`. Version 1.26.1+ 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.9.4}
export ETCD_VER=v3.6.7
export CONSUL_VER=1.11.4
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
# Unset any legacy core.hooksPath config that may interfere with worktrees
git config --unset core.hooksPath 2>/dev/null || true
# install git hooks (use git-dir to support worktrees)
hooks_dir="$(git rev-parse --git-dir)/hooks"
mkdir -p "$hooks_dir"
ln -sf "$PWD/misc/git/pre-commit" "$hooks_dir/pre-commit"
ln -sf "$PWD/misc/git/commit-msg" "$hooks_dir/commit-msg"
export EXTRA_BIN=$PWD/test/bin