mirror of
https://github.com/monitoring-mixins/website.git
synced 2024-12-14 11:37:31 +00:00
23 lines
573 B
Makefile
23 lines
573 B
Makefile
|
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
|
||
|
@cd hack && go list -mod=mod -tags tools -f '{{ range .Imports }}{{ printf "%s\n" .}}{{end}}' ./ | xargs -tI % go build -mod=mod -o $(BIN_DIR) %
|