-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDirectory.Build.targets
28 lines (23 loc) · 1.04 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
<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>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Tasks.Git" Version="8.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</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>