pool/poolrpc/gen_protos_docker.sh
Oliver Gugger 938e608ab2
multi: update lnd master with grpc-gateway upgrade
To make pool work with the latest lnd version inside of LiT, we need
to upgrade the grpc-gateway library to the same v2 version here too.
2021-07-29 14:01:23 +02:00

23 lines
685 B
Bash
Executable file

#!/bin/bash
set -e
# Directory of the script file, independent of where it's called from.
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
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..."
docker build -t pool-protobuf-builder \
--build-arg PROTOBUF_VERSION="$PROTOBUF_VERSION" \
--build-arg GRPC_GATEWAY_VERSION="$GRPC_GATEWAY_VERSION" \
.
echo "Compiling and formatting *.proto files..."
docker run \
--rm \
--user $UID:$UID \
-e UID=$UID \
-v "$DIR/../:/build" \
pool-protobuf-builder