Skip to content

Commit

Permalink
Add .Net 6.0 latest version (#5912)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-cheb authored Jul 15, 2022
1 parent 907e9a0 commit 92f8e13
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
17 changes: 12 additions & 5 deletions images/macos/provision/core/dotnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ DOTNET_VERSIONS=($(get_toolset_value '.dotnet.versions | .[]'))

for DOTNET_VERSION in "${DOTNET_VERSIONS[@]}"; do
RELEASE_URL="https://raw.githubusercontent.com/dotnet/core/master/release-notes/${DOTNET_VERSION}/releases.json"
ARGS_LIST+=(
$(curl -s "$RELEASE_URL" | \
jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | \
sort -r | rev | uniq -s 2 | rev)
)

if [[ $DOTNET_VERSION == "6.0" ]]; then
ARGS_LIST+=(
$(curl -s "$RELEASE_URL" | jq -r 'first(.releases[].sdks[]?.version | select(contains("preview") or contains("rc") | not))')
)
else
ARGS_LIST+=(
$(curl -s "$RELEASE_URL" | \
jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | \
sort -r | rev | uniq -s 2 | rev)
)
fi
done

for ARGS in "${ARGS_LIST[@]}"; do
Expand Down
3 changes: 2 additions & 1 deletion images/macos/toolsets/toolset-11.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@
"dotnet": {
"versions": [
"3.1",
"5.0"
"5.0",
"6.0"
]
},
"ruby": {
Expand Down
3 changes: 2 additions & 1 deletion images/macos/toolsets/toolset-12.json
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
"dotnet": {
"versions": [
"3.1",
"5.0"
"5.0",
"6.0"
]
},
"ruby": {
Expand Down

0 comments on commit 92f8e13

Please sign in to comment.