Repository navigation
Expand file tree
/
Copy pathbuild.cake
More file actions
51 lines (35 loc) · 1.5 KB
/
Copy pathbuild.cake
File metadata and controls
51 lines (35 loc) · 1.5 KB
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
// DEFAULTS
#load "./.build/definitions.cake"
// ARGUMENTS
var target = Argument("target", "Default");
ProjectSettings settings = new ProjectSettings("sharparchitecture", "Sharp-Architecture", "SharpArch")
{
CodeCoverage =
{
// Coverlet filter syntax: [Assembly]TypeName
IncludeFilter = new List<string> { "[SharpArch.*]*" }
}
};
// Exclude the test assemblies themselves. Coverlet does not instrument a test project's own
// assembly, but when a test project references another test assembly (e.g. SharpArch.XunitTests.NHibernate
// references SharpArch.XunitTests) coverlet lists that referenced test assembly's source files with 0
// hits because its tests do not run here, which surfaces as bogus 0% coverage on Coveralls.
settings.CodeCoverage.ExcludeFilter.AddRange(new[] { "[Suteki*]*", "[TransactionAttribute*]*", "[SharpArch.XunitTests*]*", "[SharpArch.Tests*]*" });
// SETUP / TEARDOWN
Setup<BuildInfo>(context =>
{
var buildInfo = BuildInfo.Get(context, settings); // settings must be declared in main file
Information("Building version {0} (tagged: {1}, local: {2}, release branch: {3})...", buildInfo.Version.NuGet,
buildInfo.Repository.IsTagged, buildInfo.IsLocal, buildInfo.Repository.IsReleaseBranch);
CreateDirectory(buildInfo.Paths.ArtifactsDir);
CleanDirectory(buildInfo.Paths.ArtifactsDir);
return buildInfo;
});
Teardown(context =>
{
// Executed AFTER the last task.
});
// TASKS
#load "./.build/tasks.cake"
// EXECUTION
RunTarget(target);