forked from MarkPflug/Sylvan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.targets
43 lines (36 loc) · 1.78 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
34
35
36
37
38
39
40
41
42
43
<Project>
<PropertyGroup>
<PackageTags>$(PackageTags);.NET;Sylvan</PackageTags>
</PropertyGroup>
<Target Name="PrepareNupkg" BeforeTargets="ResolvePackageAssets">
<!-- the package folder must exist before nuget restore runs -->
<MakeDir Condition="!Exists($(PackageOutputPath))" Directories="$(PackageOutputPath)" />
</Target>
<PropertyGroup>
<ReportsDirectory>$(MSBuildThisFileDirectory)/reports</ReportsDirectory>
<CoverletOutput>$(ReportsDirectory)\$(MSBuildProjectName)\</CoverletOutput>
<CoverletOutputFormat>json,cobertura</CoverletOutputFormat>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Tasks.Git" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<!--<PackageReference Include="Coverlet.Collector" Version="3.0.2"/>-->
<PackageReference Include="Coverlet.MSBuild" Version="3.1.0"/>
<PackageReference Include="ReportGenerator" Version="4.5.0"/>
</ItemGroup>
<Target
Condition="$(VersionSuffix) == ''"
Name="PackValidations" BeforeTargets="GenerateNuspec">
<!--
Attempt to prevent myself from accidentally releasing a debug build.
These checks are disabled for pre-release builds.
-->
<Error Condition="$(Configuration) != 'Release'" Text="Attempting to pack a debug build."/>
<Error Condition="$(SourceRevisionId.Contains('-dirty'))" Text="Attempting to pack from a dirty repository."/>
</Target>
</Project>