Skip to content

Commit

Permalink
Upgrade and fix prototool installation (#313)
Browse files Browse the repository at this point in the history
* Upgrade and fix prototool installation

* add quotes, let curl commands fail if page is not found

* add quotes to other curl commands
  • Loading branch information
ido-namely authored Jul 11, 2022
1 parent 04f7a3f commit f8c9fff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ARG grpc_web_version
ARG scala_pb_version
ARG go_envoyproxy_pgv_version
ARG go_mwitkow_gpv_version
ARG uber_prototool_version

RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
build-essential \
Expand Down Expand Up @@ -62,7 +63,7 @@ RUN mkdir -p /usr/local/include/google/protobuf && \
cp -a /tmp/grpc/bazel-grpc/external/com_google_protobuf/src/google/protobuf/. /usr/local/include/google/protobuf/

WORKDIR /tmp
RUN curl -sSL https://github.com/uber/prototool/releases/download/v${uber_prototool_version}/prototool-$(uname -s)-$(uname -m) \
RUN curl -fsSL "https://github.com/uber/prototool/releases/download/v${uber_prototool_version}/prototool-$(uname -s)-$(uname -m)" \
-o /usr/local/bin/prototool && \
chmod +x /usr/local/bin/prototool

Expand Down Expand Up @@ -114,12 +115,12 @@ RUN go get -u github.com/mwitkow/go-proto-validators/@v${go_mwitkow_gpv_version}
RUN go get -u github.com/mwitkow/go-proto-validators/protoc-gen-govalidators@v${go_mwitkow_gpv_version}

# Add scala support
RUN curl -LO https://github.com/scalapb/ScalaPB/releases/download/v${scala_pb_version}/protoc-gen-scala-${scala_pb_version}-linux-x86_64.zip \
RUN curl -fLO "https://github.com/scalapb/ScalaPB/releases/download/v${scala_pb_version}/protoc-gen-scala-${scala_pb_version}-linux-x86_64.zip" \
&& unzip protoc-gen-scala-${scala_pb_version}-linux-x86_64.zip \
&& chmod +x /tmp/protoc-gen-scala

# Add grpc-web support
RUN curl -sSL https://github.com/grpc/grpc-web/releases/download/${grpc_web_version}/protoc-gen-grpc-web-${grpc_web_version}-linux-x86_64 \
RUN curl -fsSL "https://github.com/grpc/grpc-web/releases/download/${grpc_web_version}/protoc-gen-grpc-web-${grpc_web_version}-linux-x86_64" \
-o /tmp/grpc_web_plugin && \
chmod +x /tmp/grpc_web_plugin

Expand Down Expand Up @@ -149,7 +150,7 @@ RUN set -ex && apt-get update && apt-get install -y --no-install-recommends \
gawk

# Install latest Node version
RUN curl -fsSL https://deb.nodesource.com/setup_${node_version}.x | bash -
RUN curl -fsSL "https://deb.nodesource.com/setup_${node_version}.x" | bash -
RUN apt-get install -y nodejs

# Add TypeScript support
Expand Down
2 changes: 1 addition & 1 deletion variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GRPC_VERSION=${GRPC_VERSION:-1.47}
GRPC_JAVA_VERSION=${GRPC_JAVA_VERSION:-1.47}
GRPC_WEB_VERSION=${GRPC_WEB_VERSION:-1.3.0}
GRPC_GATEWAY_VERSION=${GRPC_GATEWAY_VERSION:-2.0.1}
UBER_PROTOTOOL_VERSION=${UBER_PROTOTOOL_VERSION:-1.3.0}
UBER_PROTOTOOL_VERSION=${UBER_PROTOTOOL_VERSION:-1.10.0}
SCALA_PB_VERSION=${SCALA_PB_VERSION:-0.11.0}
NODE_VERSION=${NODE_VERSION:-14}
NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION=${NODE_GRPC_TOOLS_NODE_PROTOC_TS_VERSION:-5.1.3}
Expand Down

0 comments on commit f8c9fff

Please sign in to comment.