Skip to content

Commit

Permalink
chore(deps): upgrade protobuf and grpc
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
  • Loading branch information
sagikazarmark committed Mar 24, 2021
1 parent 2bf728c commit 95796b0
Show file tree
Hide file tree
Showing 9 changed files with 4,008 additions and 2,603 deletions.
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ GOLANGCI_VERSION = 1.32.2

PROTOC_VERSION = 3.15.6
PROTOC_GEN_GO_VERSION = 1.26.0
PROTOC_GEN_GO_GRPC_VERSION = 1.1.0

build: bin/dex

Expand Down Expand Up @@ -94,8 +95,8 @@ fix: bin/golangci-lint ## Fix lint violations
docker-image:
@sudo docker build -t $(DOCKER_IMAGE) .

.PHONY: proto
proto: bin/protoc-old bin/protoc-gen-go-old
.PHONY: proto-old
proto-old: bin/protoc-old bin/protoc-gen-go-old
@./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/v2/*.proto
@cp api/v2/*.proto api/
@./bin/protoc-old --go_out=plugins=grpc:. --plugin=protoc-gen-go=./bin/protoc-gen-go-old api/*.proto
Expand All @@ -121,6 +122,12 @@ FORCE:

.PHONY: test testrace testall

.PHONY: proto
proto: bin/protoc bin/protoc-gen-go bin/protoc-gen-go-grpc
@./bin/protoc --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. --plugin=protoc-gen-go=./bin/protoc-gen-go --plugin=protoc-gen-go-grpc=./bin/protoc-gen-go-grpc api/v2/*.proto
@./bin/protoc --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. --plugin=protoc-gen-go=./bin/protoc-gen-go --plugin=protoc-gen-go-grpc=./bin/protoc-gen-go-grpc api/*.proto
#@cp api/v2/*.proto api/

.PHONY: proto-internal
proto-internal: bin/protoc bin/protoc-gen-go
@./bin/protoc --go_out=paths=source_relative:. --plugin=protoc-gen-go=./bin/protoc-gen-go server/internal/*.proto
Expand All @@ -143,3 +150,9 @@ bin/protoc-gen-go: bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION}
bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION}:
@mkdir -p bin
curl -L https://github.com/protocolbuffers/protobuf-go/releases/download/v${PROTOC_GEN_GO_VERSION}/protoc-gen-go.v${PROTOC_GEN_GO_VERSION}.${OS}.amd64.tar.gz | tar -zOxf - protoc-gen-go > ./bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION} && chmod +x ./bin/protoc-gen-go-${PROTOC_GEN_GO_VERSION}

bin/protoc-gen-go-grpc: bin/protoc-gen-go-grpc-${PROTOC_GEN_GO_GRPC_VERSION}
@ln -sf protoc-gen-go-grpc-${PROTOC_GEN_GO_GRPC_VERSION} bin/protoc-gen-go-grpc
bin/protoc-gen-go-grpc-${PROTOC_GEN_GO_GRPC_VERSION}:
@mkdir -p bin
curl -L https://github.com/grpc/grpc-go/releases/download/cmd%2Fprotoc-gen-go-grpc%2Fv${PROTOC_GEN_GO_GRPC_VERSION}/protoc-gen-go-grpc.v${PROTOC_GEN_GO_GRPC_VERSION}.${OS}.amd64.tar.gz | tar -zOxf - ./protoc-gen-go-grpc > ./bin/protoc-gen-go-grpc-${PROTOC_GEN_GO_GRPC_VERSION} && chmod +x ./bin/protoc-gen-go-grpc-${PROTOC_GEN_GO_GRPC_VERSION}
Loading

0 comments on commit 95796b0

Please sign in to comment.