Skip to content

Commit

Permalink
fix: go doesn't release major.minor versions anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Mar 1, 2024
1 parent cdb0079 commit 8050f4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/update-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ if [[ "$language" != "Go" ]]; then
fi

expected="$(jq -r '.config.versions.go' <<< "$CONTEXT")"
version="$(curl -sSfL https://go.dev/dl/\?mode\=json | jq -r --arg expected "$expected" 'map(.version) | map(select(startswith("go\($expected)"))) | .[0]')"

tmp="$(mktemp -d)"
pushd "$tmp" > /dev/null
curl -sSfL "https://golang.org/dl/go$expected.linux-amd64.tar.gz" | tar -xz
curl -sSfL "https://golang.org/dl/$version.linux-amd64.tar.gz" | tar -xz
export PATH="$tmp/go/bin:$PATH"
export GOPATH=$tmp/go
popd > /dev/null
Expand Down

0 comments on commit 8050f4e

Please sign in to comment.