This repository has been archived by the owner on Apr 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
recipe.cake
54 lines (43 loc) · 2.14 KB
/
recipe.cake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#load nuget:?package=Cake.Recipe&version=3.1.1
//*************************************************************************************************
// Settings
//*************************************************************************************************
Environment.SetVariableNames();
BuildParameters.SetParameters(
context: Context,
buildSystem: BuildSystem,
sourceDirectoryPath: "./src",
title: "Cake.Issues.PullRequests.AzureDevOps",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.Issues.PullRequests.AzureDevOps",
appVeyorAccountName: "cakecontrib",
shouldRunCoveralls: false, // Disabled because it's currently failing
shouldPostToGitter: false, // Disabled because it's currently failing
shouldGenerateDocumentation: false,
shouldRunDotNetCorePack: true);
BuildParameters.PrintParameters(Context);
ToolSettings.SetToolPreprocessorDirectives(
reSharperTools: "#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.3.0");
ToolSettings.SetToolSettings(
context: Context,
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Common]* -[Cake.Testing]* -[*.Tests]* -[Cake.Issues]* -[Cake.Issues.Testing]* -[Cake.Issues.PullRequests]* -[Cake.AzureDevOps]* -[Shouldly]* -[DiffEngine]* -[EmptyFiles]*",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
//*************************************************************************************************
// Custom tasks
//*************************************************************************************************
Task("BreakBuildOnIssues")
.Description("Breaks build if any issues in the code are found.")
.Does<IssuesData>((data) =>
{
if (data.Issues.Any())
{
throw new Exception("Issues found in code.");
}
});
IssuesBuildTasks.IssuesTask
.IsDependentOn("BreakBuildOnIssues");
//*************************************************************************************************
// Execution
//*************************************************************************************************
Build.RunDotNetCore();