@@ -443,7 +443,7 @@ $Q rm -f $(addprefix $(BUILD)/,$(1))
443
443
$Q +$(MAKE ) --no-print-directory $(addprefix $(BUILD ) /,$(1 ) )
444
444
endef
445
445
446
- .PHONY : lint fmt pr
446
+ .PHONY : lint fmt pr mockery
447
447
448
448
# useful to actually re-run to get output again.
449
449
# reuse the intermediates for simplicity and consistency.
@@ -453,6 +453,10 @@ lint: ## (Re)run the linter
453
453
# intentionally not re-making, it's a bit slow and it's clear when it's unnecessary
454
454
fmt : $(BUILD ) /fmt # # Run `gofmt` / organize imports / etc
455
455
456
+ mockery : $(BIN ) /mockery
457
+ $Q mockery
458
+ $Q $(call remake,fmt)
459
+
456
460
define make_quietly
457
461
$Q echo "make $1..."
458
462
$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
529
533
tools : $(TOOLS )
530
534
531
535
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..."
533
539
$Q # add our bins to PATH so `go generate` can find them
534
540
$Q $(BIN_PATH ) go generate $(if $(verbose ) ,-v) ./...
535
541
$Q $(MAKE ) --no-print-directory fmt
0 commit comments