mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-05 04:55:18 +00:00
proto: use docker to generate stubs (#4615)
* proto: use docker to generate stubs - provide an option to developers to use docker to generate proto stubs closes #4579 Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
This commit is contained in:
@@ -22,7 +22,8 @@ Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermi
|
||||
- [privval] \#4534 Add `error` as a return value on`GetPubKey()`
|
||||
- [Docker] \#4569 Default configuration added to docker image (you can still mount your own config the same way) (@greg-szabo)
|
||||
- [lite2] [\#4562](https://github.com/tendermint/tendermint/pull/4562) Cache headers when using bisection (@cmwaters)
|
||||
- [all] [\4608](https://github.com/tendermint/tendermint/pull/4608) Give reactors descriptive names when they're initialized
|
||||
- [all] [\#4608](https://github.com/tendermint/tendermint/pull/4608) Give reactors descriptive names when they're initialized
|
||||
- [tools] \#4615 Allow developers to use Docker to generate proto stubs, via `make proto-gen-docker`.
|
||||
|
||||
### BUG FIXES:
|
||||
|
||||
|
||||
@@ -105,7 +105,10 @@ We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along
|
||||
|
||||
For linting and checking breaking changes, we use [buf](https://buf.build/). If you would like to run linting and check if the changes you have made are breaking then you will need to have docker running locally. Then the linting cmd will be `make proto-lint` and the breaking changes check will be `make proto-check-breaking`.
|
||||
|
||||
To generate new stubs based off of your changes you can run `make proto-gen` after installing `protoc` and gogoproto.
|
||||
There are two ways to generate your proto stubs.
|
||||
|
||||
1. Use Docker, pull an image that will generate your proto stubs with no need to install anything. `make proto-gen-docker`
|
||||
2. Run `make proto-gen` after installing `protoc` and gogoproto.
|
||||
|
||||
### Installation Instructions
|
||||
|
||||
|
||||
5
Makefile
5
Makefile
@@ -54,6 +54,11 @@ proto-gen:
|
||||
@sh scripts/protocgen.sh
|
||||
.PHONY: proto-gen
|
||||
|
||||
proto-gen-docker:
|
||||
@echo "Generating Protobuf files"
|
||||
@docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./scripts/protocgen.sh
|
||||
.PHONY: proto-gen-docker
|
||||
|
||||
proto-lint:
|
||||
@$(DOCKER_BUF) check lint --error-format=json
|
||||
.PHONY: proto-lint
|
||||
|
||||
Reference in New Issue
Block a user