Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protobuf generation #322

Merged
merged 4 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ BINDIR ?= $(GOPATH)/bin
BUILDDIR ?= $(CURDIR)/build
HTTPS_GIT := https://github.com/babylonchain/babylon.git
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was not used anywhere, also all buf usage comes from protoImage

SIMAPP = ./simapp

BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
Expand Down Expand Up @@ -365,7 +364,13 @@ proto-swagger-gen:
@echo "Generating Protobuf Swagger"
@$(protoImage) sh ./proto/scripts/protoc-swagger-gen.sh

.PHONY: proto-gen proto-swagger-gen
proto-format:
@$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \;

proto-lint:
@$(protoImage) buf lint --error-format=json

.PHONY: proto-gen proto-swagger-gen proto-format prot-lint

###############################################################################
### Localnet ###
Expand Down
3 changes: 3 additions & 0 deletions buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v1
directories:
- proto
8 changes: 4 additions & 4 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
},
"apis": [
{
"url": "./tmp-swagger-gen/babylon/btccheckpoint/query.swagger.json",
"url": "./tmp-swagger-gen/babylon/btccheckpoint/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "BtcCheckpointParams"
}
}
},
{
"url": "./tmp-swagger-gen/babylon/btclightclient/query.swagger.json",
"url": "./tmp-swagger-gen/babylon/btclightclient/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "BtcLightClientParams"
Expand All @@ -31,15 +31,15 @@
}
},
{
"url": "./tmp-swagger-gen/babylon/checkpointing/query.swagger.json",
"url": "./tmp-swagger-gen/babylon/checkpointing/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "CheckpointingParams"
}
}
},
{
"url": "./tmp-swagger-gen/babylon/zoneconcierge/query.swagger.json",
"url": "./tmp-swagger-gen/babylon/zoneconcierge/v1/query.swagger.json",
"operationIds": {
"rename": {
"Params": "ZoneConciergeParams"
Expand Down
Loading