Skip to content

Commit 58b042c

Browse files
authored
🌱 build(tools): make helm and hcloud downloads platform-agnostic (#1635)
build(tools): make helm and hcloud downloads platform-agnostic Replace hardcoded `linux-amd64` architecture with dynamic `$(go env GOOS)-$(go env GOARCH)` to support multiple platforms and architectures during tool installation. Signed-off-by: Tomas DabaÅ¡inskas <[email protected]>
1 parent 10b6eba commit 58b042c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ $(CLUSTERCTL):
127127
HELM := $(abspath $(TOOLS_BIN_DIR)/helm)
128128
helm: $(HELM) ## Build a local copy of helm
129129
$(HELM):
130-
curl -sSL https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz | tar xz -C $(TOOLS_BIN_DIR) --strip-components=1 linux-amd64/helm
130+
curl -sSL https://get.helm.sh/helm-v3.13.2-$$(go env GOOS)-$$(go env GOARCH).tar.gz | tar xz -C $(TOOLS_BIN_DIR) --strip-components=1 $$(go env GOOS)-$$(go env GOARCH)/helm
131131
chmod a+rx $(HELM)
132132

133133
HCLOUD := $(abspath $(TOOLS_BIN_DIR)/hcloud)
134134
hcloud: $(HCLOUD) ## Build a local copy of hcloud
135135
$(HCLOUD):
136-
curl -sSL https://github.com/hetznercloud/cli/releases/download/v1.43.1/hcloud-linux-amd64.tar.gz | tar xz -C $(TOOLS_BIN_DIR) hcloud
136+
curl -sSL https://github.com/hetznercloud/cli/releases/download/v1.43.1/hcloud-$$(go env GOOS)-$$(go env GOARCH).tar.gz | tar xz -C $(TOOLS_BIN_DIR) hcloud
137137
chmod a+rx $(HCLOUD)
138138

139139
KIND := $(abspath $(TOOLS_BIN_DIR)/kind)

0 commit comments

Comments
 (0)