proto: update docs (#6537)

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
This commit is contained in:
Marko 2020-07-01 15:53:11 +02:00 committed by GitHub
parent bcaf17c33c
commit b671bff594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -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.

View File

@ -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; \
@ -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}" \