Skip to content

Commit

Permalink
proto: update docs (cosmos#6537)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
  • Loading branch information
tac0turtle and alexanderbez committed Jul 1, 2020
1 parent bcaf17c commit b671bff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along

For linting and checking breaking changes, we use [buf](https://buf.build/). There are two options for linting and to check if your changes will cause a break. The first is that you can install [buf](https://buf.build/docs/installation) locally, the commands for running buf after installing are `make proto-lint` and the breaking changes check will be `make proto-check-breaking`. If you do not want to install buf and have docker installed already then you can use these commands `make proto-lint-docker` and `make proto-check-breaking-docker`.

To generate the protobuf stubs you must have `protoc` and `protoc-gen-gocosmos` installed. To install these tools run `make protoc` & `make protoc-gen-gocosmos`. After this step you will be able to run `make proto-gen` to generate the protobuf stubs.
To generate the protobuf stubs you must have `protoc` and `protoc-gen-gocosmos` installed. To install these tools run `make proto-tools`. After this step you will be able to run `make proto-gen` to generate the protobuf stubs.

In order for imports to properly compile in your IDE, you may need to manually set your protobuf path in your IDE's workspace settings/config.

Expand Down
10 changes: 3 additions & 7 deletions contrib/devtools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ ifeq ($(UNAME_S),Darwin)
PROTOC_ZIP ?= protoc-3.11.2-osx-x86_64.zip
endif

proto-tools: proto-tools-stamp
proto-tools: proto-tools-stamp protoc-gen-gocosmos buf

proto-tools-stamp:
@echo "Installing protoc compiler..."
@(cd /tmp; \
Expand All @@ -94,12 +95,7 @@ proto-tools-stamp:
unzip -o ${PROTOC_ZIP} -d $(PREFIX) 'include/*'; \
rm -f ${PROTOC_ZIP})

@echo "Installing protoc-gen-buf-check-breaking..."
@curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/protoc-gen-buf-check-breaking-${UNAME_S}-${UNAME_M}" \
-o "${BIN}/protoc-gen-buf-check-breaking" && \
chmod +x "${BIN}/protoc-gen-buf-check-breaking"

buf:
@echo "Installing buf..."
@curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v${BUF_VERSION}/buf-${UNAME_S}-${UNAME_M}" \
Expand Down

0 comments on commit b671bff

Please sign in to comment.