Skip to content

Commit

Permalink
chore: update pack for ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Feb 18, 2024
1 parent 51f0029 commit 3558153
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@
<Import Project="..\Directory.Build.targets" />

<Target Name="CopyNuGetReadme"
BeforeTargets="_GetPackageFiles"
BeforeTargets="Build;CoreCompile"
Condition=" $(IsPackable) == 'true' ">
<Exec Command="echo # $(PackageId) > $(IntermediateOutputPath)\readme.txt"
<Exec Command="echo # $(PackageId) > $(IntermediateOutputPath)\ReadMe.md"
ConsoleToMsBuild="true" />

<Exec Command="type $(MSBuildThisFileDirectory)ReadMe.md >> $(IntermediateOutputPath)\readme.txt"
<Exec Command="type $(MSBuildThisFileDirectory)ReadMe.md >> $(IntermediateOutputPath)\ReadMe.md"
ConsoleToMsBuild="true" />
</Target>

<Target Name="PackNuGetReadMe"
AfterTargets="CopyNuGetReadme">
<PropertyGroup>
<PackageReadmeFile>ReadMe.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<_PackageFiles Include="$(IntermediateOutputPath)\readme.txt" PackagePath="" />
<None Include="$(IntermediateOutputPath)\ReadMe.md" PackagePath="\" Pack="true" />
</ItemGroup>
</Target>

Expand Down

0 comments on commit 3558153

Please sign in to comment.