Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritesh-Patel committed Oct 2, 2019
1 parent 1c6622a commit f0e1c46
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 27 additions & 1 deletion 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 ./...
Expand Down
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -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

Expand Down

0 comments on commit f0e1c46

Please sign in to comment.