Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
brocwoodworthIBLX committed Mar 18, 2024
1 parent bd4b149 commit 4b51ecd
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 70 deletions.
20 changes: 6 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,23 @@ check-fmt:
test -z `go fmt ./...`

.gen-query:
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \
--go_out=:. $(REPO)/query/collection_operators.proto
mv $(PROJECT_ROOT)/v2/query/collection_operators.pb.go $(PROJECT_ROOT)/query/collection_operators.pb.go
rm -rf $(PROJECT_ROOT)/v2

.gen-errdetails:
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \
--go_out=:. $(REPO)/rpc/errdetails/error_details.proto
mv $(PROJECT_ROOT)/v2/rpc/errdetails/error_details.pb.go $(PROJECT_ROOT)/v2/rpc/errdetails/error_details.pb.go
rm -rf $(PROJECT_ROOT)/v2

.gen-errfields:
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \
--go_out=:. $(REPO)/rpc/errfields/error_fields.proto
mv $(PROJECT_ROOT)/v2/rpc/errfields/error_fields.pb.go $(PROJECT_ROOT)/v2/rpc/errfields/error_fields.pb.go
rm -rf $(PROJECT_ROOT)/v2

.gen-servertestdata:
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \
--go_out=. --go-grpc_out=. --grpc-gateway_out=logtostderr=true:. $(REPO)/server/testdata/test.proto
mv $(PROJECT_ROOT)/v2/server/testdata/* $(PROJECT_ROOT)/server/testdata/
rm -rf $(PROJECT_ROOT)/v2
docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \
--go_out=. --go-grpc_out=. --grpc-gateway_out=logtostderr=true:. $(REPO)/v2/server/testdata/test.proto

.PHONY: gen
gen: .gen-query .gen-errdetails .gen-errfields
gen: .gen-query .gen-errdetails .gen-errfields .gen-servertestdata

.PHONY: mocks
mocks:
Expand Down
106 changes: 53 additions & 53 deletions server/testdata/test.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/testdata/test.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions server/testdata/test_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b51ecd

Please sign in to comment.