Shell Dep Download File
Let’s build one step by step. Assume we want to download kubectl version 1.28.0.
For developers, combining make with shell download creates reproducible builds.
Example Makefile:
DEP_URL = https://github.com/example/cli/releases/download/v2.0/cli_linux_amd64 CHECKSUM = a3b4c5d6...bin/cli: mkdir -p bin curl -L -o bin/cli $(DEP_URL) echo "$(CHECKSUM) bin/cli" | sha256sum -c - chmod +x bin/cli
clean: rm -rf bin
.PHONY: clean
Run make and the shell dep download happens automatically.
detect_platform()
OS=$(uname -s