Skip to content

Commit

Permalink
Update upstream grpc-web project to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjoDiaz committed Nov 25, 2019
1 parent 1781e8e commit 21abb8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04 AS builder

ARG MAKEFLAGS=-j8

Expand All @@ -11,23 +11,25 @@ RUN apt-get update && apt-get install -y \

RUN git clone https://github.com/grpc/grpc-web /github/grpc-web

WORKDIR /github/grpc-web

RUN git checkout tags/1.0.0

## Install gRPC and protobuf

RUN cd /github/grpc-web && \
./scripts/init_submodules.sh
RUN ./scripts/init_submodules.sh

RUN cd /github/grpc-web/third_party/grpc && \
make && make install
RUN cd third_party/grpc && make && make install

RUN cd /github/grpc-web/third_party/grpc/third_party/protobuf && \
make install
RUN cd third_party/grpc/third_party/protobuf && make install

## Install all the gRPC-web plugin

RUN cd /github/grpc-web && \
make install-plugin
RUN make install-plugin

FROM ubuntu:18.04

RUN rm -rf /github
COPY --from=builder /usr/local/bin /usr/local/bin

## Create the gRPC client
ENV import_style=commonjs
Expand All @@ -43,4 +45,4 @@ CMD rm -rf $output && \
-I=/protofile \
/protofile/$protofile \
--js_out=import_style=$import_style:$output \
--grpc-web_out=import_style=$grpc_web_import_style,mode=$mode:$output
--grpc-web_out=import_style=$grpc_web_import_style,mode=$mode:$output
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ You can add a script to your NPM file like:
...

"scripts": {
"grpc.generate": "docker run -v \"<MY_INCLUDES_FOLDER>:/protofile\" -e \"protofile=<MY_PROTO_FILE>.proto\" juanjodiaz/grpc-web-generator"
"grpc.generate": "docker run -v \"<MY_INCLUDES_FOLDER>:/protofile\" -e \"protofile=<MY_PROTO_FILE>.proto\" juanjodiaz/grpc-web-generator:1.0.0"
},

...
Expand Down

0 comments on commit 21abb8e

Please sign in to comment.