Skip to content

Commit

Permalink
Updated runtime to filter to local runtimes for *nix/osx
Browse files Browse the repository at this point in the history
  • Loading branch information
david-driscoll committed Mar 25, 2016
1 parent cd65e41 commit be219b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ public class BuildPlan

var buildPlan = DeserializeJsonFromFile<BuildPlan>($"{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();

Expand Down

0 comments on commit be219b2

Please sign in to comment.