From 2b05f9654f597e9008c7ff09635cb21a27e71856 Mon Sep 17 00:00:00 2001 From: ghubstan <36207203+ghubstan@users.noreply.github.com> Date: Thu, 23 Jun 2022 14:30:09 -0300 Subject: [PATCH] Simplify downloading .protos from other branches Make it easier to download .proto files from different branches. --- proto-downloader/download-bisq-protos.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/proto-downloader/download-bisq-protos.sh b/proto-downloader/download-bisq-protos.sh index 064a2dd..9bd04ad 100755 --- a/proto-downloader/download-bisq-protos.sh +++ b/proto-downloader/download-bisq-protos.sh @@ -1,11 +1,17 @@ #!/bin/bash -echo "Downloading Bisq protobuf files from github to $PROTO_PATH directory..." +# Download Bisq's protobuf definition files. +# Change the REPO_OWNER and REPO_BRANCH vars if you (developer) need to download from an alternative repo and branch. + +REPO_OWNER="bisq-network" +REPO_BRANCH="master" +REPO_PROTO_DIR_URL="https://raw.githubusercontent.com/$REPO_OWNER/bisq/$REPO_BRANCH/proto/src/main/proto" + +echo "Downloading Bisq protobuf files from $REPO_PROTO_DIR_URL to $PROTO_PATH directory..." echo "You can skip this step and copy your own local .proto files instead." -# Download the Bisq master branch's protobuf definition files. -curl -o ./pb.proto https://raw.githubusercontent.com/bisq-network/bisq/master/proto/src/main/proto/pb.proto -curl -o ./grpc.proto https://raw.githubusercontent.com/bisq-network/bisq/master/proto/src/main/proto/grpc.proto +curl -o ./pb.proto "$REPO_PROTO_DIR_URL"/pb.proto +curl -o ./grpc.proto "$REPO_PROTO_DIR_URL"/grpc.proto echo "Copying proto files to the Java examples project." cp -v *.proto ../java-examples/src/main/proto