forked from naudio/NAudio
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
32 lines (30 loc) · 1.4 KB
/
Copy pathDirectory.Build.targets
File metadata and controls
32 lines (30 loc) · 1.4 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
<Project>
<!--
Common pack-time items for NAudio NuGet packages. The icon is anchored
to the repo root via $(MSBuildThisFileDirectory) so it resolves
correctly from any csproj depth. The README include is conditional on
a README.md sitting next to the csproj — NAudio packages each have
their own per-package README; tool/test projects don't, so the
conditional include is silently inert for them.
-->
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)naudio-icon.png" Pack="true" PackagePath="" Visible="false" />
</ItemGroup>
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\README.md')">
<None Include="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<!--
If PackageReleaseNotesFile is supplied (e.g. by the release workflow
passing -p:PackageReleaseNotesFile=<path>), load its contents into
PackageReleaseNotes so NuGet displays them on the package page.
No-op when the property is unset or the file is missing, so local
`dotnet pack` keeps working with no extra setup.
-->
<Target Name="LoadPackageReleaseNotesFromFile"
BeforeTargets="GenerateNuspec"
Condition="'$(PackageReleaseNotesFile)' != '' and Exists('$(PackageReleaseNotesFile)')">
<PropertyGroup>
<PackageReleaseNotes>$([System.IO.File]::ReadAllText('$(PackageReleaseNotesFile)'))</PackageReleaseNotes>
</PropertyGroup>
</Target>
</Project>