From be219b272a5cd9ad6322362f6875c7ff618fd24f Mon Sep 17 00:00:00 2001 From: David Driscoll Date: Fri, 25 Mar 2016 16:07:44 -0400 Subject: [PATCH] Updated runtime to filter to local runtimes for *nix/osx --- build.cake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.cake b/build.cake index 6d78d636b2..d182cfc84f 100644 --- a/build.cake +++ b/build.cake @@ -41,15 +41,17 @@ public class BuildPlan var buildPlan = DeserializeJsonFromFile($"{workingDirectory}/build.json"); // Limit scope if things we build -buildPlan.Rids = buildPlan.Rids.Where(rid => { +buildPlan.Rids = buildPlan.Rids.Where(runtime => { if (IsRunningOnWindows()) { - return rid.StartsWith("win"); + return runtime.StartsWith("win"); } else { - // Need to fix this for osx / linux - return !rid.StartsWith("win"); + var localRuntime = GetLocalRuntimeID(dotnetcli); + var localRuntimeWithoutVersion = Regex.Replace(localRuntime, "(\\d|\\.)*-", "-"); + var runtimeWithoutVersion = Regex.Replace(runtime, "(\\d|\\.)*-", "-"); + return localRuntimeWithoutVersion.Equals(runtimeWithoutVersion); } }).ToArray();