VERSION := "invalid"
DOWNLOAD_BASEURL := "https://get.helm.sh"

.PHONY: clean

all: arm64/helm amd64/helm

%/helm: helm-v$(VERSION)-linux-%.tar.gz
	mkdir -p $(shell echo $@ | sed 's#/.*##')
	tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<" --strip-components=1

helm-v$(VERSION)-linux-%.tar.gz:
	wget -nc --progress=dot:mega "$(DOWNLOAD_BASEURL)/$@" -O "$@"
	sha256sum -c --ignore-missing sha256sums.txt

clean:
	rm -rf arm64
	rm -rf amd64
	rm -f helm-v$(VERSION)-linux-*.tar.gz
