Skip to content

Commit

Permalink
Merge pull request #1033 from stacklok/make-gen
Browse files Browse the repository at this point in the history
devex: Converge code generation into a single Makefile target
  • Loading branch information
JAORMX authored Sep 28, 2023
2 parents 00c2b54 + 01ce51b commit f1f43b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ default: help
help: ## list makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

gen: ## generate protobuf files
gen: buf sqlc mock ## Run code generation targets (buf, sqlc, mock)

buf: ## Run protobuf code generation
buf generate

clean-gen:
Expand Down Expand Up @@ -143,6 +145,6 @@ dbschema: ## generate database schema with schema spy, monitor file until doc is
cp database/schema/output/diagrams/summary/relationships.real.large.png docs/static/img/mediator/schema.png
cd database/schema && $(COMPOSE) down -v && rm -rf output

mock:
mock: ## generate mocks
mockgen -package mockdb -destination database/mock/store.go github.com/stacklok/mediator/internal/db Store
mockgen -package mockgh -destination internal/providers/github/mock/github.go -source pkg/providers/v1/providers.go GitHub

0 comments on commit f1f43b1

Please sign in to comment.