Skip to content

Commit f0e1c46

Browse files
committed
update deps
1 parent 1c6622a commit f0e1c46

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

Makefile

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1+
PROTOC_VERSION := 3.9.2
2+
PROTOC_WEB_VERSION := 1.0.6
3+
4+
PROTO_SOURCES := -I /usr/local/include
5+
PROTO_SOURCES += -I .
6+
PROTO_SOURCES += -I ${GOPATH}/src
7+
PROTO_SOURCES += -I ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
8+
PROTO_SOURCES += -I ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway
9+
110
VERSION:= 0.0.1
211

3-
deps:
12+
deps-linux: deps-go deps-protoc-linux deps-grpc-web-linux
13+
14+
deps-protoc-linux:
15+
curl -OL https://github.com/google/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-x86_64.zip
16+
unzip protoc-$(PROTOC_VERSION)-linux-x86_64.zip -d protoc3
17+
sudo mv protoc3/bin/* /usr/local/bin/
18+
sudo mv protoc3/include/* /usr/local/include/
19+
rm -rf protoc3 protoc-$(PROTOC_VERSION)-linux-x86_64.zip
20+
21+
deps-grpc-web-linux:
22+
curl -OL https://github.com/grpc/grpc-web/releases/download/$(PROTOC_WEB_VERSION)/protoc-gen-grpc-web-$(PROTOC_WEB_VERSION)-linux-x86_64
23+
sudo mv protoc-gen-grpc-web-$(PROTOC_WEB_VERSION)-linux-x86_64 /usr/local/bin/protoc-gen-grpc-web
24+
chmod +x /usr/local/bin/protoc-gen-grpc-web
25+
26+
deps-go:
427
go get -u github.com/gobuffalo/packr/v2/packr2
28+
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
29+
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
30+
go get -u github.com/golang/protobuf/protoc-gen-go
531

632
fmt:
733
go fmt ./...

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ The generation will create 2 folders.
4141
In order to use this you need ensure you have these installed.
4242
* protoc
4343
* protoc-gen-go [Go]
44+
* protoc-gen-web [gRPC Web]
45+
* protoc-gen-gateway [Http]
46+
* prooc-gen-swagger [Swagger]
4447

4548
## Building locally
4649

0 commit comments

Comments
 (0)