Files
octokit.net/build/Context.cs
Ryan Gribble 7114bcb41e General updates (#1653)
* Update README and shipping-releases as they are a bit out of date

* Update year/copyright info

* Update cake.frosting to latest for newest dotnet tooling support, and adjust builds for new configuration parameters

* update xunit packages so codelens works for nested test classes (VS2017 15.3 update is also required)

* Fixup VS version and remove win debugging tools
2017-08-16 21:33:03 +10:00

52 lines
1.3 KiB
C#

using Cake.Common;
using Cake.Common.Diagnostics;
using Cake.Common.Tools.DotNetCore.Test;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
public class Context : FrostingContext
{
public string Target { get; set; }
public string Configuration { get; set; }
public bool LinkSources { get; set; }
public BuildVersion Version { get; set; }
public DirectoryPath Artifacts { get; set; }
public bool IsLocalBuild { get; set; }
public bool IsPullRequest { get; set; }
public bool IsOriginalRepo { get; set; }
public bool IsTagged { get; set; }
public bool IsMasterBranch { get; set; }
public bool ForcePublish { get; set; }
public bool AppVeyor { get; set; }
public bool TravisCI { get; set; }
public Project[] Projects { get; set; }
public DotNetCoreTestSettings GetTestSettings()
{
var settings = new DotNetCoreTestSettings
{
Configuration = Configuration,
NoBuild = true
};
if (!this.IsRunningOnWindows())
{
var testFramework = "netcoreapp1.0";
this.Information($"Running tests against {testFramework} only as we're not on Windows.");
settings.Framework = testFramework;
}
return settings;
}
public Context(ICakeContext context)
: base(context)
{
}
}