Skip to content

Commit 232de81

Browse files
authored
check gum and helm is installed properly (#2326)
1 parent 99fdad2 commit 232de81

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

devtools/Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ DEVTOOLS_DIR := $(MKFILE_DIR).devtools
2222
PICK_SERVICES := $(MKFILE_DIR)pick_services.sh
2323
MINIKUBE_DIR := $(DEVTOOLS_DIR)/minikube
2424
MINIKUBE := $(MINIKUBE_DIR)/minikube
25+
HELM_DIR := $(DEVTOOLS_DIR)/helm
2526
TILT_DIR := $(DEVTOOLS_DIR)/tilt
2627
TILT := $(TILT_DIR)/tilt
2728
TILTFILE := $(MKFILE_DIR)/Tiltfile
@@ -51,9 +52,18 @@ endif
5152

5253
install-helm:
5354
@if ! command -v helm >/dev/null 2>&1; then \
54-
echo "📥 Installing Helm $(HELM_VERSION) (may require sudo access)..."; \
55-
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | HELM_INSTALL_VERSION=$(HELM_VERSION) bash; \
55+
echo "📥 Installing Helm $(HELM_VERSION)..."; \
56+
mkdir -p "$(HELM_DIR)"; \
57+
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
58+
| HELM_INSTALL_VERSION="$(HELM_VERSION)" \
59+
USE_SUDO="false" \
60+
PATH="$(HELM_DIR):$$PATH" \
61+
HELM_INSTALL_DIR="$(HELM_DIR)" \
62+
bash; \
63+
chmod +x "$(HELM_DIR)/helm"; \
5664
echo "✅ Helm installation complete"; \
65+
else \
66+
echo "✅ Helm is already installed at $$(command -v helm)"; \
5767
fi
5868

5969
check-docker:
@@ -99,7 +109,7 @@ install-gum:
99109
@if ! command -v gum >/dev/null 2>&1; then \
100110
echo "📥 Installing gum..."; \
101111
if [ "$(shell uname)" = "Darwin" ]; then \
102-
HOMEBREW_NO_AUTO_UPDATE=1 brew install gum; \
112+
HOMEBREW_NO_AUTO_UPDATE=1 brew install gum|| { echo "❌ Failed to install gum via Homebrew"; exit 1; }; \
103113
elif command -v apt-get >/dev/null 2>&1; then \
104114
curl -fsSL -o /tmp/gum.deb \
105115
"https://github.com/charmbracelet/gum/releases/download/$(GUM_VERSION)/gum_$(GUM_VERSION:v%=%)_$(arch).deb"; \
@@ -182,7 +192,7 @@ up: install-brew check-docker install-curl install-gum setup-minikube install-he
182192
@echo 'PATH="$(MINIKUBE_DIR):$(TILT_DIR):$$PATH" $(MINIKUBE) tunnel &' >> $(DEVTOOLS_DIR)/start.sh
183193
@echo 'echo -e "🚀 Starting Tilt with selected services..."' >> $(DEVTOOLS_DIR)/start.sh
184194
@echo 'echo -e "\033[1;38;5;46m\n🔥 \033[1;38;5;196mNext Steps:\033[0;38;5;46m Use \033[3mmetaflow-dev shell\033[23m to switch to the development\n environment'\''s shell and start executing your Metaflow flows.\n\033[0m"' >> "$(DEVTOOLS_DIR)/start.sh"
185-
@echo 'PATH="$(MINIKUBE_DIR):$(TILT_DIR):$$PATH" SERVICES="$$SERVICES" tilt up -f $(TILTFILE)' >> $(DEVTOOLS_DIR)/start.sh
195+
@echo 'PATH="$(HELM_DIR):$(MINIKUBE_DIR):$(TILT_DIR):$$PATH" SERVICES="$$SERVICES" tilt up -f $(TILTFILE)' >> $(DEVTOOLS_DIR)/start.sh
186196
@echo 'wait' >> $(DEVTOOLS_DIR)/start.sh
187197
@chmod +x $(DEVTOOLS_DIR)/start.sh
188198
@$(DEVTOOLS_DIR)/start.sh

0 commit comments

Comments
 (0)