-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathrecipe.cake
54 lines (43 loc) · 2.36 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",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.Issues",
appVeyorAccountName: "cakecontrib",
shouldUseDeterministicBuilds: true,
shouldGenerateDocumentation: false, // Documentation is generated from Cake.Issues.Website
shouldRunCoveralls: false, // Disabled because it's currently failing
shouldPostToGitter: false); // Disabled because it's currently failing
BuildParameters.PrintParameters(Context);
ToolSettings.SetToolPreprocessorDirectives(
gitReleaseManagerGlobalTool: "#tool dotnet:?package=GitReleaseManager.Tool&version=0.17.0"
);
ToolSettings.SetToolSettings(
context: Context,
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[Cake.Issues]LitJson.* -[Shouldly]* -[DiffEngine]* -[EmptyFiles]*",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
//*************************************************************************************************
// Setup
//*************************************************************************************************
Setup(context =>
{
// Addins are backwards compatible to latest major version.
// Since we are using project references, we need to fix assembly version to the latest
// major version to avoid requiring exact minor versions at runtime.
var settings = context.Data.Get<DotNetCoreMSBuildSettings>();
var version = new Version(settings.Properties["AssemblyVersion"].First());
settings.Properties["AssemblyVersion"] = new List<string> { $"{version.Major}.0.0.0" };
context.Log.Information("AssemblyVersion changed to {0}", settings.Properties["AssemblyVersion"].First());
});
//*************************************************************************************************
// Execution
//*************************************************************************************************
Build.RunDotNetCore();