Skip to content

Commit 2cd5585

Browse files
committed
add mockery to makefile, oops
1 parent dd969d3 commit 2cd5585

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ $Q rm -f $(addprefix $(BUILD)/,$(1))
443443
$Q +$(MAKE) --no-print-directory $(addprefix $(BUILD)/,$(1))
444444
endef
445445

446-
.PHONY: lint fmt pr
446+
.PHONY: lint fmt pr mockery
447447

448448
# useful to actually re-run to get output again.
449449
# reuse the intermediates for simplicity and consistency.
@@ -453,6 +453,10 @@ lint: ## (Re)run the linter
453453
# intentionally not re-making, it's a bit slow and it's clear when it's unnecessary
454454
fmt: $(BUILD)/fmt ## Run `gofmt` / organize imports / etc
455455

456+
mockery: $(BIN)/mockery
457+
$Q mockery
458+
$Q $(call remake,fmt)
459+
456460
define make_quietly
457461
$Q echo "make $1..."
458462
$Q output=$$(mktemp); $(MAKE) $1 > $$output 2>&1 || ( cat $$output; echo -e '\nfailed `make $1`, check output above' >&2; exit 1)
@@ -529,7 +533,9 @@ bins: $(BINS) ## Build all binaries, and any fast codegen needed (does not refre
529533
tools: $(TOOLS)
530534

531535
go-generate: $(BIN)/mockgen $(BIN)/enumer $(BIN)/mockery $(BIN)/gowrap ## Run `go generate` to regen mocks, enums, etc
532-
$Q echo "running go generate ./..., this takes a minute or more..."
536+
$Q echo "running mockery..."
537+
$Q mockery --log-level error
538+
$Q echo "running go generate ./..., this takes a few minutes..."
533539
$Q # add our bins to PATH so `go generate` can find them
534540
$Q $(BIN_PATH) go generate $(if $(verbose),-v) ./...
535541
$Q $(MAKE) --no-print-directory fmt

0 commit comments

Comments
 (0)