Skip to content

Commit eb5d299

Browse files
authored
Revert "[dotnet] - Fixing the dotnet smoke test issue with changes in test script." (#1343)
Revert "[dotnet] - Fixing the dotnet smoke test issue with changes in test sc…" This reverts commit 8895eb3.
1 parent 8895eb3 commit eb5d299

File tree

3 files changed

+2
-41
lines changed

3 files changed

+2
-41
lines changed

src/dotnet/devcontainer-feature.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "dotnet",
3-
"version": "2.2.2",
3+
"version": "2.2.1",
44
"name": "Dotnet CLI",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/dotnet",
66
"description": "This Feature installs the latest .NET SDK, which includes the .NET CLI and the shared runtime. Options are provided to choose a different version or additional versions.",

test/dotnet/dotnet_helpers.sh

-38
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,6 @@ fetch_latest_version_in_channel() {
1717
fi
1818
}
1919

20-
# Function to resolve the actual version from an aka.ms URL
21-
resolve_version_from_aka_ms() {
22-
local normalized_channel="${1:-LTS}" # defaulting to LTS channel
23-
local normalized_product="dotnet-sdk"
24-
local normalized_os="linux"
25-
26-
# Dynamically determine the architecture
27-
local normalized_architecture
28-
normalized_architecture=$(uname -m)
29-
case "$normalized_architecture" in
30-
x86_64) normalized_architecture="x64" ;;
31-
aarch64) normalized_architecture="arm64" ;;
32-
arm*) normalized_architecture="arm" ;;
33-
*)
34-
echo "Unsupported architecture: $normalized_architecture"
35-
return 1
36-
;;
37-
esac
38-
39-
# Construct the aka.ms link
40-
local aka_ms_link="https://aka.ms/dotnet/$normalized_channel/$normalized_product-$normalized_os-$normalized_architecture.tar.gz"
41-
echo "Constructed aka.ms link: $aka_ms_link"
42-
43-
# Resolve the redirect URL using curl
44-
local resolved_url
45-
resolved_url=$(curl -s -L -o /dev/null -w "%{url_effective}" "$aka_ms_link")
46-
echo "Resolved URL: $resolved_url"
47-
48-
# Extract the version from the resolved URL
49-
IFS='/'
50-
read -ra pathElems <<< "$resolved_url"
51-
local count=${#pathElems[@]}
52-
local specific_version="${pathElems[count-2]}"
53-
unset IFS
54-
55-
echo "Extracted version: $specific_version"
56-
}
57-
5820
# Prints the latest dotnet version
5921
# Usage: fetch_latest_version [<runtime>]
6022
# Example: fetch_latest_version

test/dotnet/install_dotnet_lts.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ source dev-container-features-test-lib
1313
source dotnet_env.sh
1414
source dotnet_helpers.sh
1515

16-
# Changing it as the dotnet SDK CDN url is not showing the right version for LTS
17-
expected=$(resolve_version_from_aka_ms "LTS" | cut -d' ' -f3)
16+
expected=$(fetch_latest_version_in_channel "LTS")
1817

1918
check "Latest LTS version installed" \
2019
is_dotnet_sdk_version_installed "$expected"

0 commit comments

Comments
 (0)