From be539412b826a1511eba0ab061bc4ec7f9182302 Mon Sep 17 00:00:00 2001 From: lifubang Date: Wed, 14 Aug 2024 18:30:18 +0800 Subject: [PATCH] ensure we can download the specific version's go Signed-off-by: lifubang --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index c5661a02a4a..35cd3d4abf7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -119,7 +119,7 @@ task: # Install Go. PREFIX="https://go.dev/dl/" # Find out the latest minor release URL. - 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 + "\""') + 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') curl -fsSL "$PREFIX$filename" | tar Cxz /usr/local # install bats cd /tmp