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 committed Nov 1, 2023
1 parent 769a287 commit 1efab1f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions services/horizon/docker/verify-range/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +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}

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

# 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 1efab1f

Please sign in to comment.