aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotnet/devcontainer-feature.json5
-rw-r--r--src/dotnet/install.sh8
2 files changed, 10 insertions, 3 deletions
diff --git a/src/dotnet/devcontainer-feature.json b/src/dotnet/devcontainer-feature.json
index 04e5f0c..cbe0054 100644
--- a/src/dotnet/devcontainer-feature.json
+++ b/src/dotnet/devcontainer-feature.json
@@ -9,17 +9,18 @@
"type": "string",
"proposals": [
"latest",
+ "lts",
"7",
"6",
"3"
],
"default": "latest",
- "description": "Version of .NET to install. Use 'latest' for the latest LTS version, 'X' for the latest of a major version, or 'X.Y.Z' for a specific version."
+ "description": "Version of .NET to install. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X' for the latest of a major version, or 'X.Y.Z' for a specific version."
},
"additionalVersions": {
"type": "string",
"default": "",
- "description": "Comma-separated list of additional .NET versions to install. Use 'latest' for the latest LTS version, 'X' for the latest of a major version, or 'X.Y.Z' for a specific version."
+ "description": "Comma-separated list of additional .NET versions to install. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X' for the latest of a major version, or 'X.Y.Z' for a specific version."
},
"runtimeOnly": {
"type": "boolean",
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh
index a302947..e21d3f9 100644
--- a/src/dotnet/install.sh
+++ b/src/dotnet/install.sh
@@ -36,7 +36,7 @@ check_packages() {
# The version must be 'latest', use the form 'X', or use the form 'X.Y.Z'
install_version() {
local version="$1"
- local channel="LTS"
+ local channel="STS"
local runtime_arg=""
echo "Installing version '$version'..."
@@ -47,6 +47,12 @@ install_version() {
version="latest"
fi
+ # If version is 'lts', then update the channel
+ if [ "$version" = "lts" ]; then
+ channel="LTS"
+ version="latest"
+ fi
+
# Make sure the version is formatted correctly (form 'X' is handled before this)
if ! [[ "$version" = "latest" || "$version" =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then
echo "Invalid version '$version': version must be 'latest' or use the form 'X.Y.Z'"