From 46520bfdb3f5a1d7b3a13c068032eaac0da1be97 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 5 Nov 2020 19:14:50 +0300 Subject: [PATCH 1/3] 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" + ] + } } From 7f988415454f4326ab4e3e9f86237cb37bdf1bea Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Thu, 5 Nov 2020 19:35:43 +0300 Subject: [PATCH 2/3] small rework --- images/linux/scripts/installers/dotnetcore-sdk.sh | 7 ++++--- images/linux/toolsets/toolset-1604.json | 15 +++++++-------- images/linux/toolsets/toolset-1804.json | 14 +++++++------- images/linux/toolsets/toolset-2004.json | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index 1af226e72..31210b6ef 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -10,8 +10,8 @@ source $HELPER_SCRIPTS/os.sh # Ubuntu 20 doesn't support EOL versions toolset="$INSTALLER_SCRIPT_FOLDER/toolset.json" -LATEST_DOTNET_PACKAGES=$(jq -r '.dotnetCoreSdk.latest_dotnet_packages[]' $toolset) -release_urls=$(jq -r '.dotnetCoreSdk.release_urls[]' $toolset) +LATEST_DOTNET_PACKAGES=$(jq -r '.dotnet.aptPackages[]' $toolset) +versions=$(jq -r '.dotnet.versions[]' $toolset) mksamples() { @@ -44,7 +44,8 @@ done # Get list of all released SDKs from channels which are not end-of-life or preview sdks=() -for release_url in ${release_urls[@]}; do +for version in ${versions[@]}; do + release_url="https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/${version}/releases.json" echo "${release_url}" releases=$(curl "${release_url}") sdks=("${sdks[@]}" $(echo "${releases}" | jq '.releases[]' | jq '.sdk.version')) diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index 6972fe94d..4ba7b456b 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -189,18 +189,17 @@ "ubuntu:14.04" ] }, - "dotnetCoreSdk": { - "latest_dotnet_packages": [ + "dotnet": { + "aptPackages": [ "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" - + "versions": [ + "2.1", + "3.0", + "3.1", + "5.0" ] } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index 74fa3d059..7a9b2788a 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -193,17 +193,17 @@ "cmd": "sam" } ], - "dotnetCoreSdk": { - "latest_dotnet_packages": [ + "dotnet": { + "aptPackages": [ "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" + "versions": [ + "2.1", + "3.0", + "3.1", + "5.0" ] } } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 9531e3fb5..37e7ade9f 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -167,15 +167,15 @@ "cmd": "sam" } ], - "dotnetCoreSdk": { - "latest_dotnet_packages": [ + "dotnet": { + "aptPackages": [ "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" + "versions": [ + "2.1", + "3.1", + "5.0" ] } } From 3fcc00e234d3d6da33b979c09a8074ac3a9a9873 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov Date: Tue, 10 Nov 2020 16:02:17 +0300 Subject: [PATCH 3/3] remove dotnet-core 5.0 --- images/linux/toolsets/toolset-1604.json | 6 ++---- images/linux/toolsets/toolset-1804.json | 6 ++---- images/linux/toolsets/toolset-2004.json | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index 4ba7b456b..4708718bb 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -192,14 +192,12 @@ "dotnet": { "aptPackages": [ "dotnet-sdk-3.0", - "dotnet-sdk-3.1", - "dotnet-sdk-5.0" + "dotnet-sdk-3.1" ], "versions": [ "2.1", "3.0", - "3.1", - "5.0" + "3.1" ] } } diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index 7a9b2788a..d3a94212c 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -196,14 +196,12 @@ "dotnet": { "aptPackages": [ "dotnet-sdk-3.0", - "dotnet-sdk-3.1", - "dotnet-sdk-5.0" + "dotnet-sdk-3.1" ], "versions": [ "2.1", "3.0", - "3.1", - "5.0" + "3.1" ] } } diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 37e7ade9f..b4c17da09 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -169,13 +169,11 @@ ], "dotnet": { "aptPackages": [ - "dotnet-sdk-3.1", - "dotnet-sdk-5.0" + "dotnet-sdk-3.1" ], "versions": [ "2.1", - "3.1", - "5.0" + "3.1" ] } }