2020-08-13 08:17:57 +00:00
|
|
|
SHELL=/bin/bash -o pipefail
|
|
|
|
|
|
|
|
BIN_DIR?=$(shell pwd)/tmp/bin
|
|
|
|
|
|
|
|
JB_BIN=$(BIN_DIR)/jb
|
|
|
|
GOJSONTOYAML_BIN=$(BIN_DIR)/gojsontoyaml
|
|
|
|
JSONNET_BIN=$(BIN_DIR)/jsonnet
|
|
|
|
TOOLING=$(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN)
|
|
|
|
|
|
|
|
.PHONY: all
|
|
|
|
all: generate
|
|
|
|
|
|
|
|
.PHONY: generate
|
|
|
|
generate: $(JB_BIN) $(GOJSONTOYAML_BIN) $(JSONNET_BIN)
|
|
|
|
./hack/generate.sh
|
|
|
|
|
|
|
|
$(BIN_DIR):
|
|
|
|
mkdir -p $(BIN_DIR)
|
|
|
|
|
|
|
|
$(TOOLING): $(BIN_DIR)
|
|
|
|
@echo Installing tools from hack/tools.go
|
2023-11-06 17:51:53 +00:00
|
|
|
@cd hack && go list -mod=mod -tags tools -e -f '{{ range .Imports }}{{ printf "%s\n" .}}{{end}}' ./ | xargs -tI % go build -mod=mod -o $(BIN_DIR) %
|