From 379220ce504d561579edf923d468a6c36ccadc66 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 5 Nov 2020 20:06:59 +0300 Subject: [PATCH 1/4] add dotnet core 5.0 --- images/macos/provision/core/dotnet.sh | 25 +++++------------------- images/macos/toolsets/toolset-10.13.json | 7 ++++++- images/macos/toolsets/toolset-10.14.json | 7 ++++++- images/macos/toolsets/toolset-10.15.json | 10 +++++++++- images/macos/toolsets/toolset-11.0.json | 9 ++++++++- 5 files changed, 34 insertions(+), 24 deletions(-) diff --git a/images/macos/provision/core/dotnet.sh b/images/macos/provision/core/dotnet.sh index 36df3be9..3093dc45 100755 --- a/images/macos/provision/core/dotnet.sh +++ b/images/macos/provision/core/dotnet.sh @@ -19,35 +19,20 @@ chmod +x ./dotnet-install.sh ARGS_LIST=() echo "Parsing dotnet SDK (except rc and preview versions) from .json..." -# TO-DO: move the list of versions to install to toolset -if is_BigSur; then - DOTNET_CHANNELS=( - 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json' - 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json' - ) -elif is_Less_Catalina; then - DOTNET_CHANNELS=( - 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json' - ) -else - DOTNET_CHANNELS=( - 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/2.1/releases.json' - 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.0/releases.json' - 'https://raw.githubusercontent.com/dotnet/core/master/release-notes/3.1/releases.json' - ) -fi +DOTNET_VERSIONS=$(get_toolset_value '.dotnet[].versions') -for DOTNET_CHANNEL in "${DOTNET_CHANNELS[@]}"; do +for DOTNET_VERSION in "${DOTNET_VERSIONS[@]}"; do + RELEASE_URL="https://raw.githubusercontent.com/dotnet/core/master/release-notes/${DOTNET_VERSION}/releases.json" # Old Mono versions don't support NuGet versions from .Net sdk >=2.1.6**, exclude them explicitly from Mojave and HS images # https://rider-support.jetbrains.com/hc/en-us/articles/360004180039 if is_Less_Catalina; then ARGS_LIST+=( - $(curl -s "$DOTNET_CHANNEL" | \ + $(curl -s "$RELEASE_URL" | \ jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*' | grep -v -E '2.1.[6-9]\d*') ) else ARGS_LIST+=( - $(curl -s "$DOTNET_CHANNEL" | \ + $(curl -s "$RELEASE_URL" | \ jq -r '.releases[].sdk."version"' | grep -v -E '\-(preview|rc)\d*') ) fi diff --git a/images/macos/toolsets/toolset-10.13.json b/images/macos/toolsets/toolset-10.13.json index e4834c8b..c96c723e 100644 --- a/images/macos/toolsets/toolset-10.13.json +++ b/images/macos/toolsets/toolset-10.13.json @@ -205,5 +205,10 @@ "package": "yamllint", "cmd": "yamllint --version" } - ] + ], + "dotnet": { + "versions": [ + "2.1" + ] + } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.14.json b/images/macos/toolsets/toolset-10.14.json index 2d0972ca..f66c2f38 100644 --- a/images/macos/toolsets/toolset-10.14.json +++ b/images/macos/toolsets/toolset-10.14.json @@ -265,5 +265,10 @@ "package": "yamllint", "cmd": "yamllint --version" } - ] + ], + "dotnet": { + "versions": [ + "2.1" + ] + } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json index 11a7e016..828684ab 100644 --- a/images/macos/toolsets/toolset-10.15.json +++ b/images/macos/toolsets/toolset-10.15.json @@ -181,5 +181,13 @@ "package": "yamllint", "cmd": "yamllint --version" } - ] + ], + "dotnet": { + "versions": [ + "2.1", + "3.0", + "3.1", + "5.0" + ] + } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-11.0.json b/images/macos/toolsets/toolset-11.0.json index 874dec12..693d9f61 100644 --- a/images/macos/toolsets/toolset-11.0.json +++ b/images/macos/toolsets/toolset-11.0.json @@ -106,5 +106,12 @@ "package": "yamllint", "cmd": "yamllint --version" } - ] + ], + "dotnet": { + "versions": [ + "2.1", + "3.1", + "5.0" + ] + } } \ No newline at end of file From 30c295f82332aac59144515b094a181b6bd1a370 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 5 Nov 2020 20:15:43 +0300 Subject: [PATCH 2/4] small fix --- images/macos/provision/core/dotnet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/macos/provision/core/dotnet.sh b/images/macos/provision/core/dotnet.sh index 3093dc45..651f82d1 100755 --- a/images/macos/provision/core/dotnet.sh +++ b/images/macos/provision/core/dotnet.sh @@ -19,7 +19,7 @@ chmod +x ./dotnet-install.sh ARGS_LIST=() echo "Parsing dotnet SDK (except rc and preview versions) from .json..." -DOTNET_VERSIONS=$(get_toolset_value '.dotnet[].versions') +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" From 7bf2707ac2f0bff7de372eeeda73b0d0c4929c65 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Tue, 10 Nov 2020 15:57:29 +0300 Subject: [PATCH 3/4] remove dotnet-core 5.0 --- images/macos/toolsets/toolset-10.15.json | 3 +-- images/macos/toolsets/toolset-11.0.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/images/macos/toolsets/toolset-10.15.json b/images/macos/toolsets/toolset-10.15.json index 828684ab..20ed9091 100644 --- a/images/macos/toolsets/toolset-10.15.json +++ b/images/macos/toolsets/toolset-10.15.json @@ -186,8 +186,7 @@ "versions": [ "2.1", "3.0", - "3.1", - "5.0" + "3.1" ] } } \ No newline at end of file diff --git a/images/macos/toolsets/toolset-11.0.json b/images/macos/toolsets/toolset-11.0.json index 693d9f61..a474acd2 100644 --- a/images/macos/toolsets/toolset-11.0.json +++ b/images/macos/toolsets/toolset-11.0.json @@ -110,8 +110,7 @@ "dotnet": { "versions": [ "2.1", - "3.1", - "5.0" + "3.1" ] } } \ No newline at end of file From 211470228d25d1c367ec4418894095c9976d29d4 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Tue, 10 Nov 2020 20:43:05 +0300 Subject: [PATCH 4/4] resolve issue with getting dotnet versions --- images/macos/provision/core/dotnet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/macos/provision/core/dotnet.sh b/images/macos/provision/core/dotnet.sh index 651f82d1..81442d70 100755 --- a/images/macos/provision/core/dotnet.sh +++ b/images/macos/provision/core/dotnet.sh @@ -19,7 +19,7 @@ chmod +x ./dotnet-install.sh ARGS_LIST=() echo "Parsing dotnet SDK (except rc and preview versions) from .json..." -DOTNET_VERSIONS=$(get_toolset_value '.dotnet.versions[]') +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"