Skip to content

Commit 2ee5564

Browse files
authored
Merge pull request #4378 from lifubang/fix-ci-curlL
[CI] ensure we can download the specific version's go
2 parents 94eda74 + be53941 commit 2ee5564

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ task:
119119
# Install Go.
120120
PREFIX="https://go.dev/dl/"
121121
# Find out the latest minor release URL.
122-
eval $(curl -fsSL "${PREFIX}?mode=json" | jq -r --arg Ver "$GO_VERSION" '.[] | select(.version | startswith("go\($Ver)")) | .files[] | select(.os == "linux" and .arch == "amd64" and .kind == "archive") | "filename=\"" + .filename + "\""')
122+
filename=$(curl -fsSL "${PREFIX}?mode=json&include=all" | jq -r --arg Ver "go$GO_VERSION." '. | map(select(.version | contains($Ver))) | first | .files[] | select(.os == "linux" and .arch == "amd64" and .kind == "archive") | .filename')
123123
curl -fsSL "$PREFIX$filename" | tar Cxz /usr/local
124124
# install bats
125125
cd /tmp

0 commit comments

Comments
 (0)