[wasm] InstallWorkloadFromArtifacts: correctly handle rtm versions
authorAnkit Jain <radical@gmail.com>
Wed, 20 Sep 2023 20:41:07 +0000 (16:41 -0400)
committerAnkit Jain <radical@gmail.com>
Wed, 20 Sep 2023 23:16:34 +0000 (19:16 -0400)
In case of a version like `8.0.100-rtm.23470.1`, we incorrectly
extracted `-rtm.23470` instead of `-rtm`, which resulted in trying to
install package named `Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-rtm.23470` instead of `Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100-rtm`.

src/tasks/WorkloadBuildTasks/InstallWorkloadFromArtifacts.cs

index 224527142fa898929868b391c0650ce5b840aea8..62817719af0a14a5afaa8bd02932ee82cbf6a41c 100644 (file)
@@ -49,7 +49,7 @@ namespace Microsoft.Workload.Build.Tasks
         private string _tempDir = string.Empty;
         private string _nugetCachePath = string.Empty;
 
-        [GeneratedRegex(@"^\d+\.\d+\.\d+(-[A-z]*\.*\d*)?")]
+        [GeneratedRegex(@"^\d+\.\d+\.\d+(-rtm|-[A-z]*\.*\d*)?")]
         private static partial Regex bandVersionRegex();
 
         public override bool Execute()