From 63af63dfa832a2fa3616c854ca7535cf79d86424 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 6 Aug 2024 18:38:10 +0200 Subject: [PATCH] lnrpc: avoid needing to download Golang Because the Go version used to run the `go list` commands is below the minimum version specified in the main go.mod file, every time the `make rpc` command is executed, the Golang runtime is downloaded twice, which looks like this and takes a couple of seconds at least: go: downloading go1.21.4 (linux/amd64) go: downloading go1.21.4 (linux/amd64) We fix this by using the correct minimum version. --- lnrpc/gen_protos_docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnrpc/gen_protos_docker.sh b/lnrpc/gen_protos_docker.sh index c5263bcd8..edf97e06b 100755 --- a/lnrpc/gen_protos_docker.sh +++ b/lnrpc/gen_protos_docker.sh @@ -6,7 +6,7 @@ set -e DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" # golang docker image version used in this script. -GO_IMAGE=docker.io/library/golang:1.21.0-alpine +GO_IMAGE=docker.io/library/golang:1.21.4-alpine PROTOBUF_VERSION=$(docker run --rm -v $DIR/../:/lnd -w /lnd $GO_IMAGE \ go list -f '{{.Version}}' -m google.golang.org/protobuf)