-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (25 loc) · 753 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (25 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec
BINDIR = bin
BIN_YAMLFMT = go run github.com/google/yamlfmt/cmd/yamlfmt -conf=.yamlfmt
##@ Options
cmd ?= build
push ?= false
##@ Commands
.PHONY: help
help: ## Display this help text
bin/makehelp $(MAKEFILE_LIST)
%: ## run the cmd against the named filter
$(MAKE) $(cmd) -C filter/$* push=$(push)
.PHONY: all
all: ## run the cmd against all filters
@$(foreach filter, $(wildcard filter/*/), $(MAKE) $(cmd) -C $(filter) push=$(push);)
.PHONY: clean
clean: ## clean up the local bin dir
@rm -f $(filter-out $(BINDIR)/init, $(wildcard $(BINDIR)/*))
.PHONY: yaml-lint
yaml-lint: ## Lint yaml files
$(BIN_YAMLFMT) -lint
.PHONY: yaml-fmt
yaml-fmt: ## Format yaml files
$(BIN_YAMLFMT)