-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectory.Build.targets
33 lines (30 loc) · 1.01 KB
/
Directory.Build.targets
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
<Project>
<!-- <Usage>dotnet msbuild -t:Coveraging -p:threshold=80</Usage> -->
<Target Name="Coveraging">
<Exec Command='dotnet run \
--no-restore \
--no-build \
--coverage \
--coverage-output "$(MSBuildProjectDirectory)"/.coverage/coverage.cob \
--coverage-output-format cobertura \
--coverage-settings "$(MSBuildProjectDirectory)"/../codecoverage.runsettings'
/>
<Exec Command='reportgenerator \
-targetdir:$(MSBuildProjectDirectory)/.coverage/ \
-reports:$(MSBuildProjectDirectory)/.coverage/coverage.cob \
-reporttypes:MarkdownSummary \
-title:summary.md \
minimumCoverageThresholds:lineCoverage=$(threshold) \
minimumCoverageThresholds:branchCoverage=$(threshold)'
/>
</Target>
<Target Name="Packing">
<Exec Command='dotnet pack \
$(MSBuildProjectFullPath) \
--no-restore \
--no-build \
--configuration Release \
--output "$(MSBuildProjectDirectory)"/../.packages'
/>
</Target>
</Project>