good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 0559d56d authored by Alex Sharov's avatar Alex Sharov Committed by GitHub
Browse files

Pin protoc version and store it in ./build/bin (#1154)

* use ./build/bin folder to store protobuf binaries

* use ./build/bin folder to store protobuf binaries
parent 7bb9cb42
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,16 @@ endif
GIT_COMMIT=$(shell git rev-list -1 HEAD)
OS = $(shell uname -s)
ARCH = $(shell uname -m)
ifeq ($(OS),Darwin)
PROTOC_OS := osx
endif
ifeq ($(OS),Linux)
PROTOC_OS = linux
endif
all: tg hack tester rpctest state restapi pics rpcdaemon integration
docker:
......@@ -147,6 +157,13 @@ bindings:
grpc:
# See also: ./cmd/hack/binary-deps/main.go
rm -f ./build/bin/protoc*
rm -rf ./build/include*
$(eval PROTOC_TMP := $(shell mktemp -d))
cd $(PROTOC_TMP); curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-$(PROTOC_OS)-$(ARCH).zip -o protoc.zip
cd $(PROTOC_TMP); unzip protoc.zip && mv bin/protoc $(GOBIN) && mv include $(GOBIN)/..
$(GOBUILD) -o $(GOBIN)/protoc-gen-go google.golang.org/protobuf/cmd/protoc-gen-go # generates proto messages
$(GOBUILD) -o $(GOBIN)/protoc-gen-go-grpc google.golang.org/grpc/cmd/protoc-gen-go-grpc # generates grpc services
PATH=$(GOBIN):$(PATH) go generate ./ethdb # add folder with binaries to temporary PATH, `protoc` will search there installed above plugins
......
......@@ -22,14 +22,14 @@ import (
)
// generate the messages
//go:generate protoc --go_out=. "./remote/kv.proto"
//go:generate protoc --go_out=. "./remote/db.proto"
//go:generate protoc --go_out=. "./remote/ethbackend.proto"
//go:generate protoc --go_out=. "./remote/kv.proto" -I=. -I=./../build/include/google
//go:generate protoc --go_out=. "./remote/db.proto" -I=. -I=./../build/include/google
//go:generate protoc --go_out=. "./remote/ethbackend.proto" -I=. -I=./../build/include/google
// generate the services
//go:generate protoc --go-grpc_out=. "./remote/kv.proto"
//go:generate protoc --go-grpc_out=. "./remote/db.proto"
//go:generate protoc --go-grpc_out=. "./remote/ethbackend.proto"
//go:generate protoc --go-grpc_out=. "./remote/kv.proto" -I=. -I=./../build/include/google
//go:generate protoc --go-grpc_out=. "./remote/db.proto" -I=. -I=./../build/include/google
//go:generate protoc --go-grpc_out=. "./remote/ethbackend.proto" -I=. -I=./../build/include/google
type remoteOpts struct {
DialAddress string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment