Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet lts fix #1003

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dotnet/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Docs: https://github.com/devcontainers/features/tree/main/src/dotnet
# Maintainer: The Dev Container spec maintainers
DOTNET_VERSION="${VERSION:-"latest"}"
DOTNET_VERSION="${VERSION:-"lts"}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this was just for testing but otherwise I wouldn't change the default version

ADDITIONAL_VERSIONS="${ADDITIONALVERSIONS:-""}"
DOTNET_RUNTIME_VERSIONS="${DOTNETRUNTIMEVERSIONS:-""}"
ASPNETCORE_RUNTIME_VERSIONS="${ASPNETCORERUNTIMEVERSIONS:-""}"
Expand Down Expand Up @@ -105,7 +105,7 @@ done

# Install .NET versions and dependencies
# icu-devtools includes dependencies for .NET
check_packages wget ca-certificates icu-devtools
check_packages wget ca-certificates icu-devtools curl jq
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could drop curl and only use wget for consistency with existing code


for version in "${versions[@]}"; do
install_sdk "$version"
Expand Down
3 changes: 3 additions & 0 deletions test/dotnet/dotnet_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ fetch_latest_version_in_channel() {
wget -qO- "https://dotnetcli.azureedge.net/dotnet/Runtime/$channel/latest.version"
elif [ "$runtime" = "aspnetcore" ]; then
wget -qO- "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$channel/latest.version"
elif [ "$channel" = "LTS" ]; then
echo $(curl -s https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking it would be good to replace all usages of latest.version with release-index.json for consistency, and because using the latest.version file in scripts is not endorsed by the .NET team

jq --raw-output '[."releases-index"[] | select(."release-type"=="lts" and ."support-phase"=="active")."latest-sdk"] | first')
else
wget -qO- "https://dotnetcli.azureedge.net/dotnet/Sdk/$channel/latest.version"
fi
Expand Down
2 changes: 1 addition & 1 deletion test/dotnet/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"remoteUser": "vscode",
"features": {
"dotnet": {
"version": "latest",
"version": "lts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark, if not needed for testing, I would revert this.

"workloads": "aspire, wasm-tools"
}
}
Expand Down
Loading