From 46520bfdb3f5a1d7b3a13c068032eaac0da1be97 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 5 Nov 2020 19:14:50 +0300 Subject: [PATCH] install dotnet-core 5.0 on ubuntu --- images/linux/scripts/installers/dotnetcore-sdk.sh | 12 +++--------- images/linux/toolsets/toolset-1604.json | 14 ++++++++++++++ images/linux/toolsets/toolset-1804.json | 15 ++++++++++++++- images/linux/toolsets/toolset-2004.json | 13 ++++++++++++- 4 files changed, 43 insertions(+), 11 deletions(-) diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index ff966cd28..1af226e72 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -9,15 +9,9 @@ source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh # Ubuntu 20 doesn't support EOL versions -if isUbuntu20 ; then - LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.1") - release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json") -fi - -if isUbuntu16 || isUbuntu18 ; then - LATEST_DOTNET_PACKAGES=("dotnet-sdk-3.0" "dotnet-sdk-3.1") - release_urls=("https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json" "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json") -fi +toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" +LATEST_DOTNET_PACKAGES=$(jq -r '.dotnetCoreSdk.latest_dotnet_packages[]' $toolset) +release_urls=$(jq -r '.dotnetCoreSdk.release_urls[]' $toolset) mksamples() { diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index 1c5ff5320..6972fe94d 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -188,5 +188,19 @@ "node:12-alpine", "ubuntu:14.04" ] + }, + "dotnetCoreSdk": { + "latest_dotnet_packages": [ + "dotnet-sdk-3.0", + "dotnet-sdk-3.1", + "dotnet-sdk-5.0" + ], + "release_urls": [ + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/5.0/releases.json" + + ] } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index 226dd190a..74fa3d059 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -192,5 +192,18 @@ "package": "aws-sam-cli", "cmd": "sam" } - ] + ], + "dotnetCoreSdk": { + "latest_dotnet_packages": [ + "dotnet-sdk-3.0", + "dotnet-sdk-3.1", + "dotnet-sdk-5.0" + ], + "release_urls": [ + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/5.0/releases.json" + ] + } } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 76f2af421..9531e3fb5 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -166,5 +166,16 @@ "package": "aws-sam-cli", "cmd": "sam" } - ] + ], + "dotnetCoreSdk": { + "latest_dotnet_packages": [ + "dotnet-sdk-3.1", + "dotnet-sdk-5.0" + ], + "release_urls": [ + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json", + "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/5.0/releases.json" + ] + } }