Files
octokit.net/build/Context.cs
Nick Floyd 00b89daa23 [maint] Removes the old implementation of sourcelink and uses the newer one present in the .net SDK (#2666)
* reoves the old implemetnation of sourcelink and uses the newer one  present in the .net SDK

* cleans up appveyor

* updates proj with sourcelink props

* adds deterministic build check as well.

* Update docs/debugging-source.md

Co-authored-by: Keegan Campbell <me@kfcampbell.com>

---------

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
2023-02-07 11:14:49 -06:00

51 lines
1.3 KiB
C#

using Cake.Common;
using Cake.Common.Diagnostics;
using Cake.Common.Tools.DotNet.Test;
using Cake.Core;
using Cake.Core.IO;
using Cake.Frosting;
public class Context : FrostingContext
{
public string Target { get; set; }
public new string Configuration { get; set; }
public bool FormatCode { 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 IsMainBranch { get; set; }
public bool ForcePublish { get; set; }
public bool GitHubActions { get; set; }
public Project[] Projects { get; set; }
public FilePath GitVersionToolPath { get; set; }
public DotNetTestSettings GetTestSettings()
{
var settings = new DotNetTestSettings
{
Configuration = Configuration,
NoBuild = true
};
if (!this.IsRunningOnWindows())
{
var testFramework = "net6.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)
{
}
}