Skip to content

Commit

Permalink
Housekeeping: Allow building against prerelease versions of VS (react…
Browse files Browse the repository at this point in the history
  • Loading branch information
kdubau authored and glennawatson committed Aug 13, 2018
1 parent 0f99f94 commit 7e3d6b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ if (string.IsNullOrWhiteSpace(target))
target = "Default";
}

var includePrerelease = Argument("includePrerelease", false);

//////////////////////////////////////////////////////////////////////
// PREPARATION
//////////////////////////////////////////////////////////////////////
Expand All @@ -44,7 +46,8 @@ var local = BuildSystem.IsLocalBuild;
var isPullRequest = !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("SYSTEM_PULLREQUEST_PULLREQUESTNUMBER"));
var isRepository = StringComparer.OrdinalIgnoreCase.Equals("reactiveui/reactiveui", TFBuild.Environment.Repository.RepoName);

var msBuildPath = VSWhereLatest().CombineWithFilePath("./MSBuild/15.0/Bin/MSBuild.exe");
var vsWhereSettings = new VSWhereLatestSettings() { IncludePrerelease = includePrerelease };
var msBuildPath = VSWhereLatest(vsWhereSettings).CombineWithFilePath("./MSBuild/15.0/Bin/MSBuild.exe");

var informationalVersion = EnvironmentVariable("GitAssemblyInformationalVersion");

Expand Down Expand Up @@ -116,7 +119,7 @@ Task("GenerateEvents")
{
var eventBuilder = "./src/EventBuilder/bin/Release/net461/EventBuilder.exe";
var workingDirectory = "./src/EventBuilder/bin/Release/Net461";
var referenceAssembliesPath = VSWhereLatest().CombineWithFilePath("./Common7/IDE/ReferenceAssemblies/Microsoft/Framework");
var referenceAssembliesPath = VSWhereLatest(vsWhereSettings).CombineWithFilePath("./Common7/IDE/ReferenceAssemblies/Microsoft/Framework");

Information(referenceAssembliesPath.ToString());

Expand Down

0 comments on commit 7e3d6b4

Please sign in to comment.