diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1e6a74c67..5c49e71844 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/contrib/devtools/Makefile b/contrib/devtools/Makefile index 81f1b13606..c6cdb2662c 100644 --- a/contrib/devtools/Makefile +++ b/contrib/devtools/Makefile @@ -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}" \