From 1efab1fea9ade54a94411ce84a9d3a16b5252a2d Mon Sep 17 00:00:00 2001 From: Shawn Reuland Date: Wed, 1 Nov 2023 12:16:42 -0700 Subject: [PATCH] fixed dependecnies for verify-range to to get go version dynmaically from go.mod --- services/horizon/docker/verify-range/dependencies | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/services/horizon/docker/verify-range/dependencies b/services/horizon/docker/verify-range/dependencies index c205d8d112..910ee9cf21 100644 --- a/services/horizon/docker/verify-range/dependencies +++ b/services/horizon/docker/verify-range/dependencies @@ -11,11 +11,6 @@ echo "deb https://apt.stellar.org $(lsb_release -cs) stable" | sudo tee -a /etc/ apt-get update apt-get install -y stellar-core=${STELLAR_CORE_VERSION} -GO_VERSION=$(sed -En 's/^go[[:space:]]+([[:digit:].]+)$/\1/p' go.mod) -wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz -tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz -rm -f go${GO_VERSION}.linux-amd64.tar.gz - git clone https://github.com/stellar/go.git stellar-go cd stellar-go @@ -23,4 +18,10 @@ cd stellar-go # Below ensures we also fetch PR refs git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pull/*" git fetch --force --quiet origin + +GO_VERSION=$(sed -En 's/^go[[:space:]]+([[:digit:].]+)$/\1/p' go.mod) +wget -q https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz +tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz +rm -f go${GO_VERSION}.linux-amd64.tar.gz + /usr/local/go/bin/go build -v ./services/horizon