convert productCommits.txt to productCommits.json

This commit is contained in:
kasperk81 2022-12-08 21:15:04 +02:00 committed by martincostello
parent 161c28265b
commit 15ed53ac32

View file

@ -44,12 +44,14 @@
<Output TaskParameter="DependencyCommit" PropertyName="DepDotNetSdkCommit" />
</GetDependencyInfo>
<!-- Format for productCommits-%rid%.txt:
installer_commit="%commit%" installer_version="%version%"
runtime_commit="%commit%" runtime_version="%version%"
aspnetcore_commit="%commit%" aspnetcore_version="%version%"
windowsdesktop_commit="%commit%" windowsdesktop_version="%version%"
sdk_commit="%commit%" sdk_version="%version%"
<!-- Format for productCommits-%rid%.json:
{
"installer": { "commit": "%commit%", "version": "%version%" },
"runtime": { "commit": "%commit%", "version": "%version%" },
"aspnetcore": { "commit": "%commit%", "version": "%version%" },
"windowsdesktop": { "commit": "%commit%", "version": "%version%" },
"sdk": { "commit": "%commit%", "version": "%version%" }
}
-->
<ItemGroup>
<Line Include="installer" Version="$(PackageVersion)" Commit="$(BUILD_SOURCEVERSION)" />
@ -58,9 +60,12 @@
<Line Include="windowsdesktop" Version="$(DepWindowsDesktopVersion)" Commit="$(DepWindowsDesktopCommit)" />
<Line Include="sdk" Version="$(DepDotNetSdkVersion)" Commit="$(DepDotNetSdkCommit)" />
</ItemGroup>
<PropertyGroup>
<JsonContents>{%0A@(Line->' &quot;%(Identity)&quot;: { &quot;commit&quot;: &quot;%(Commit)&quot;, &quot;version&quot;: &quot;%(Version)&quot; }', ',%0A')%0A}</JsonContents>
</PropertyGroup>
<WriteLinesToFile
File="$(ArtifactsShippingPackagesDir)productCommit-$(Rid).txt"
Lines="@(Line->'%(Identity)_commit=&quot;%(Commit)&quot; %(Identity)_version=&quot;%(Version)&quot;', '%0A')"
File="$(ArtifactsShippingPackagesDir)productCommit-$(Rid).json"
Lines="$(JsonContents)"
Overwrite="true"
Encoding="ASCII"/>