Use task to create BaselineManifest.json

This commit is contained in:
Forgind 2023-07-26 15:14:15 -07:00
parent 9606060377
commit 198f9ca7d6

View file

@ -104,6 +104,21 @@
<Copy SourceFiles="@(ManifestContent)"
DestinationFolder="$(RedistLayoutPath)sdk-manifests/%(DestinationPath)"/>
<ItemGroup>
<FormattedManifestPaths Include="$(RedistLayoutPath)sdk-manifests\**\%(BundledManifests.Identity)\WorkloadManifest.json" />
</ItemGroup>
<JsonPropertyParser JFileNames="@(FormattedManifestPaths)" JPaths="version" Value="empty">
<Output TaskParameter="Value" ItemName="BaselineManifestsWithVersion" />
</JsonPropertyParser>
<ItemGroup>
<FormattedBaselineManifest Include="{" />
<FormattedBaselineManifest Include="&quot;$([System.IO.Path]::GetFileName(%(BaselineManifestsWithVersion.Identity)))&quot;: &quot;%(BaselineManifestsWithVersion.Version)&quot;,"/>
<FormattedBaselineManifest Include="}" />
</ItemGroup>
<WriteLinestoFile File="$(RedistLayoutPath)sdk-manifests\BaselineManifest.json" Lines="@(FormattedBaselineManifest)" />
</Target>
</Project>