You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotnet: add support for prerelease versions (#1470)
* dotnet: add support for prerelease versions
* Add 'additionalVersions' tests
* Improve handling of empty 'channel' and 'quality' values
* Fix invalid version spec in aspnetCoreRuntimeVersions
"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.",
@@ -11,28 +11,31 @@
11
11
"latest",
12
12
"lts",
13
13
"none",
14
+
"10.0",
14
15
"10.0-preview",
16
+
"10.0-daily",
17
+
"9.0",
15
18
"8.0",
16
19
"7.0",
17
20
"6.0"
18
21
],
19
22
"default": "latest",
20
-
"description": "Select or enter a .NET SDK version. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version."
23
+
"description": "Select or enter a .NET SDK version. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases."
21
24
},
22
25
"additionalVersions": {
23
26
"type": "string",
24
27
"default": "",
25
-
"description": "Enter additional .NET SDK versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version."
28
+
"description": "Enter additional .NET SDK versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases."
26
29
},
27
30
"dotnetRuntimeVersions": {
28
31
"type": "string",
29
32
"default": "",
30
-
"description": "Enter additional .NET runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version."
33
+
"description": "Enter additional .NET runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases."
31
34
},
32
35
"aspNetCoreRuntimeVersions": {
33
36
"type": "string",
34
37
"default": "",
35
-
"description": "Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version."
38
+
"description": "Enter additional ASP.NET Core runtime versions, separated by commas. Use 'latest' for the latest version, 'lts' for the latest LTS version, 'X.Y' or 'X.Y.Z' for a specific version, 'X.Y-preview' or 'X.Y-daily' for prereleases."
local cmd=("$DOTNET_INSTALL_SCRIPT""--runtime""$runtime""--version""$version""--install-dir""$DOTNET_ROOT""--no-path")
119
+
if [ -n"$channel" ];then
120
+
cmd+=("--channel""$channel")
121
+
fi
122
+
if [ -n"$quality" ];then
123
+
cmd+=("--quality""$quality")
124
+
fi
125
+
echo"Executing ${cmd[*]}"
126
+
"${cmd[@]}"
116
127
}
117
128
118
129
# Installs one or more .NET workloads
@@ -127,3 +138,50 @@ install_workloads() {
127
138
# Clean up
128
139
rm -r /tmp/dotnet-workload-temp-dir
129
140
}
141
+
142
+
# Input: version spec possibly containing -preview or -daily
143
+
# Supports channels in the forms:
144
+
# A.B (e.g. 10.0)
145
+
# A.B.Cxx (feature band e.g. 6.0.4xx)
146
+
# A.B-preview (adds quality)
147
+
# A.B-daily
148
+
# A.B.Cxx-preview
149
+
# A.B.Cxx-daily
150
+
# Output (stdout): "<clean_version> <quality>"
151
+
# - For channel specs (A.B or A.B.Cxx) without suffix -> quality is GA
152
+
# - For channel specs with -preview/-daily suffix -> quality is preview/daily
153
+
# - For exact version specs (contain a third numeric segment or prerelease labels beyond channel patterns, e.g. 8.0.100-rc.2.23502.2) -> quality is empty
0 commit comments