Skip to content

Commit 0fd800e

Browse files
authored
Merge pull request #3473 from ntnn/fix-tilt
Rely on user-installed tools
2 parents 5a0fae1 + 3ca3eab commit 0fd800e

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.kcp*
22
contrib/demo/clusters/kind/*.yaml
33
contrib/demo/clusters/kind/*.kubeconfig
4+
contrib/tilt/kcp-helm-charts/
45
*.log
56
coverage.*
67
tools

contrib/tilt/kind.sh

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,20 @@
1616

1717
set -e
1818

19-
ARCH=""
20-
case $(uname -m) in
21-
i386) ARCH="386" ;;
22-
i686) ARCH="386" ;;
23-
x86_64) ARCH="amd64" ;;
24-
arm) dpkg --print-architecture | grep -q "arm64" && ARCH="arm64" || ARCH="arm" ;;
25-
esac
26-
27-
if [ ! -f "/usr/local/bin/kind" ]; then
28-
echo "Installing KIND"
29-
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-$ARCH
30-
chmod +x ./kind
31-
sudo mv ./kind /usr/local/bin/kind
32-
else
33-
echo "KIND already installed"
19+
if ! command -v kind &> /dev/null; then
20+
echo "kind not found, exiting"
21+
exit 1
3422
fi
3523

36-
if [ ! -f "$HOME/.local/bin/tilt" ]; then
37-
echo "Installing TILT"
38-
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
39-
else
40-
echo "TILT already installed"
24+
if ! command -v helm &> /dev/null; then
25+
echo "helm not found, exiting"
26+
exit 1
27+
fi
28+
29+
if ! command -v tilt &> /dev/null; then
30+
echo "tilt not found, exiting"
31+
echo "please follow the instructions at https://github.com/tilt-dev/tilt#install-tilt"
32+
exit 1
4133
fi
4234

4335
CLUSTER_NAME=${CLUSTER_NAME:-kcp}

0 commit comments

Comments
 (0)