2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-16 00:12:52 +00:00

Merge pull request #448 from carlaKC/rpc-makeserver

swapserverrpc: remove unnecessary vars in proto dockerfile
This commit is contained in:
Carla Kirk-Cohen 2021-12-20 13:42:24 +02:00 committed by GitHub
commit fa749d4f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 9 deletions

View File

@ -9,18 +9,13 @@ RUN apt-get update && apt-get install -y \
# explicitly provided by parsing the go.mod file. Otherwise we might forget to # explicitly provided by parsing the go.mod file. Otherwise we might forget to
# update them here if we bump the versions. # update them here if we bump the versions.
ARG PROTOBUF_VERSION ARG PROTOBUF_VERSION
ARG GRPC_GATEWAY_VERSION
ENV PROTOC_GEN_GO_GRPC_VERSION="v1.1.0" ENV PROTOC_GEN_GO_GRPC_VERSION="v1.1.0"
ENV FALAFEL_VERSION="v0.9.1"
RUN cd /tmp \ RUN cd /tmp \
&& export GO111MODULE=on \ && export GO111MODULE=on \
&& go get google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \ && go get google.golang.org/protobuf/cmd/protoc-gen-go@${PROTOBUF_VERSION} \
&& go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION} \ && go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@${PROTOC_GEN_GO_GRPC_VERSION}
&& go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@${GRPC_GATEWAY_VERSION} \
&& go get github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@${GRPC_GATEWAY_VERSION} \
&& go get github.com/lightninglabs/falafel@${FALAFEL_VERSION}
WORKDIR /build WORKDIR /build

View File

@ -9,7 +9,6 @@ function generate() {
do do
protoc -I/usr/local/include -I. -I.. \ protoc -I/usr/local/include -I. -I.. \
--go_out . --go_opt paths=source_relative \ --go_out . --go_opt paths=source_relative \
--go-grpc_out . --go-grpc_opt paths=source_relative \
"${file}" "${file}"
done done
} }

View File

@ -6,12 +6,10 @@ set -e
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
PROTOBUF_VERSION=$(go list -f '{{.Version}}' -m google.golang.org/protobuf) PROTOBUF_VERSION=$(go list -f '{{.Version}}' -m google.golang.org/protobuf)
GRPC_GATEWAY_VERSION=$(go list -f '{{.Version}}' -m github.com/grpc-ecosystem/grpc-gateway/v2)
echo "Building protobuf compiler docker image..." echo "Building protobuf compiler docker image..."
docker build -t loop-protobuf-builder \ docker build -t loop-protobuf-builder \
--build-arg PROTOBUF_VERSION="$PROTOBUF_VERSION" \ --build-arg PROTOBUF_VERSION="$PROTOBUF_VERSION" \
--build-arg GRPC_GATEWAY_VERSION="$GRPC_GATEWAY_VERSION" \
. .
echo "Compiling and formatting *.proto files..." echo "Compiling and formatting *.proto files..."