1
0
Fork 0
mirror of https://github.com/monitoring-mixins/website.git synced 2024-12-14 11:37:31 +00:00
monitoring-mixins-website/Makefile
paulfantom df43594957
Better tooling
* Use jsonnet-bundler 0.4.0
* Add a Makefile for simplicity
* Use go.mod to lock tools to specific versions
* Use temporary directory to store tooling binaries
* Speed up cloning mixin by remove --filter
2020-08-13 12:49:45 +02:00

22 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) %