mirror of https://github.com/lightninglabs/loop
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
529 B
Bash
22 lines
529 B
Bash
3 years ago
|
#!/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)
|
||
|
|
||
|
echo "Building protobuf compiler docker image..."
|
||
|
docker build -t loop-protobuf-builder \
|
||
|
--build-arg PROTOBUF_VERSION="$PROTOBUF_VERSION" \
|
||
|
.
|
||
|
|
||
|
echo "Compiling and formatting *.proto files..."
|
||
|
docker run \
|
||
|
--rm \
|
||
|
--user $UID:$UID \
|
||
|
-e UID=$UID \
|
||
|
-v "$DIR/../:/build" \
|
||
|
loop-protobuf-builder
|