-
Notifications
You must be signed in to change notification settings - Fork 188
/
dev.sh
executable file
·24 lines (17 loc) · 684 Bytes
/
dev.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
set -eu
GIT_ROOT=$(git rev-parse --show-toplevel)
TOOL_DEST=$GIT_ROOT/hack/tools
# This will be fast if everything is already installed
$GIT_ROOT/.devcontainer/install-dependencies.sh --skip-installed
# Setup envtest binaries and define KUBEBUILDER_ASSETS
# NB: if you change this, .devcontainer/Dockerfile also likely needs updating
if ! ENVTEST=$("$TOOL_DEST/setup-envtest" use --print env 1.27.1) ; then
echo "Failed to setup envtest"
exit 1
fi
source <(echo $ENVTEST)
export PATH="$KUBEBUILDER_ASSETS:$TOOL_DEST:$PATH"
echo "Entering $SHELL with expanded PATH (use 'exit' to quit)."
echo "Try running 'task -l' to see possible commands."
$SHELL