From f0e1c46bb26223e6b4945aea19466dde386ce950 Mon Sep 17 00:00:00 2001 From: pritesh-patel Date: Tue, 1 Oct 2019 22:12:34 -0700 Subject: [PATCH] update deps --- Makefile | 28 +++++++++++++++++++++++++++- README.md | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 38647fc3a..00e10fc78 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,33 @@ +PROTOC_VERSION := 3.9.2 +PROTOC_WEB_VERSION := 1.0.6 + +PROTO_SOURCES := -I /usr/local/include +PROTO_SOURCES += -I . +PROTO_SOURCES += -I ${GOPATH}/src +PROTO_SOURCES += -I ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis +PROTO_SOURCES += -I ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway + VERSION:= 0.0.1 -deps: +deps-linux: deps-go deps-protoc-linux deps-grpc-web-linux + +deps-protoc-linux: + curl -OL https://github.com/google/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-x86_64.zip + unzip protoc-$(PROTOC_VERSION)-linux-x86_64.zip -d protoc3 + sudo mv protoc3/bin/* /usr/local/bin/ + sudo mv protoc3/include/* /usr/local/include/ + rm -rf protoc3 protoc-$(PROTOC_VERSION)-linux-x86_64.zip + +deps-grpc-web-linux: + curl -OL https://github.com/grpc/grpc-web/releases/download/$(PROTOC_WEB_VERSION)/protoc-gen-grpc-web-$(PROTOC_WEB_VERSION)-linux-x86_64 + sudo mv protoc-gen-grpc-web-$(PROTOC_WEB_VERSION)-linux-x86_64 /usr/local/bin/protoc-gen-grpc-web + chmod +x /usr/local/bin/protoc-gen-grpc-web + +deps-go: go get -u github.com/gobuffalo/packr/v2/packr2 + go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway + go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger + go get -u github.com/golang/protobuf/protoc-gen-go fmt: go fmt ./... diff --git a/README.md b/README.md index 80348a6b2..11f67aeb1 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,9 @@ The generation will create 2 folders. In order to use this you need ensure you have these installed. * protoc * protoc-gen-go [Go] +* protoc-gen-web [gRPC Web] +* protoc-gen-gateway [Http] +* prooc-gen-swagger [Swagger] ## Building locally