Skip to content

Commit 9d9b3a1

Browse files
[macos] add reties for dotnet download (#7601)
1 parent 92893fe commit 9d9b3a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

images/macos/provision/core/dotnet.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ DOTNET_VERSIONS=($(get_toolset_value ".dotnet.arch[\"$arch\"].versions | .[]"))
2424

2525
for DOTNET_VERSION in "${DOTNET_VERSIONS[@]}"; do
2626
RELEASE_URL="https://raw.githubusercontent.com/dotnet/core/master/release-notes/${DOTNET_VERSION}/releases.json"
27+
download_with_retries "$RELEASE_URL" "/tmp" "dotnet_${DOTNET_VERSION}.json"
2728

2829
if [[ $DOTNET_VERSION == "6.0" ]]; then
2930
ARGS_LIST+=(
30-
$(curl -s "$RELEASE_URL" | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
31+
$(cat /tmp/dotnet_${DOTNET_VERSION}.json | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
3132
)
3233
else
3334
ARGS_LIST+=(
34-
$(curl -s "$RELEASE_URL" | \
35+
$(cat /tmp/dotnet_${DOTNET_VERSION}.json | \
3536
jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | \
3637
sort -r | rev | uniq -s 2 | rev)
3738
)

0 commit comments

Comments
 (0)