Skip to content

Commit

Permalink
fixed dependecnies for verify-range to to get go version dynmaically …
Browse files Browse the repository at this point in the history
…from go.mod
  • Loading branch information
sreuland authored and 2opremio committed Nov 29, 2023
1 parent abc49f5 commit 5b0a2ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions services/horizon/docker/verify-range/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ 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}

wget -q https://dl.google.com/go/go1.18.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz

git clone https://github.com/stellar/go.git stellar-go
cd stellar-go

# By default "git fetch" only fetches refs/<branchname>
# 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

0 comments on commit 5b0a2ef

Please sign in to comment.