Add output for product commits as JSON (#17000)
This commit is contained in:
commit
445175df6d
2 changed files with 28 additions and 7 deletions
|
@ -72,6 +72,7 @@
|
|||
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'" />
|
||||
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt"
|
||||
Condition=" '$(PublishBinariesAndBadge)' == 'true' and '$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'" />
|
||||
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productCommit-*.json" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
|
||||
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)productCommit-*.txt" Condition=" '$(PublishBinariesAndBadge)' == 'true' " />
|
||||
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.swr" />
|
||||
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.msi" />
|
||||
|
@ -82,6 +83,7 @@
|
|||
<SdkNonShippingAssetsToPublish Remove="@(WixPacksToPublish)" Condition="'$(PostBuildSign)' != 'true'" />
|
||||
<SdkNonShippingAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.pkg" />
|
||||
<CheckSumsToPublish Include="$(ArtifactsShippingPackagesDir)*.sha512" />
|
||||
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.json.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false'" />
|
||||
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productCommit-*.txt.sha512" Condition=" '$(PublishBinariesAndBadge)' == 'false'" />
|
||||
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
|
||||
<CheckSumsToPublish Remove="$(ArtifactsShippingPackagesDir)sdk-productVersion.txt.sha512" Condition=" '$(OS)' != 'Windows_NT' or '$(Architecture)' != 'x64'" />
|
||||
|
|
|
@ -44,13 +44,6 @@
|
|||
<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%"
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Line Include="installer" Version="$(PackageVersion)" Commit="$(BUILD_SOURCEVERSION)" />
|
||||
<Line Include="runtime" Version="$(DepRuntimeVersion)" Commit="$(DepRuntimeCommit)" />
|
||||
|
@ -58,12 +51,38 @@
|
|||
<Line Include="windowsdesktop" Version="$(DepWindowsDesktopVersion)" Commit="$(DepWindowsDesktopCommit)" />
|
||||
<Line Include="sdk" Version="$(DepDotNetSdkVersion)" Commit="$(DepDotNetSdkCommit)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- 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%"
|
||||
-->
|
||||
<WriteLinesToFile
|
||||
File="$(ArtifactsShippingPackagesDir)productCommit-$(Rid).txt"
|
||||
Lines="@(Line->'%(Identity)_commit="%(Commit)" %(Identity)_version="%(Version)"', '%0A')"
|
||||
Overwrite="true"
|
||||
Encoding="ASCII"/>
|
||||
|
||||
<!-- 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%" }
|
||||
}
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<JsonContents>{%0A@(Line->' "%(Identity)": { "commit": "%(Commit)", "version": "%(Version)" }', ',%0A')%0A}</JsonContents>
|
||||
</PropertyGroup>
|
||||
<WriteLinesToFile
|
||||
File="$(ArtifactsShippingPackagesDir)productCommit-$(Rid).json"
|
||||
Lines="$(JsonContents)"
|
||||
Overwrite="true"
|
||||
Encoding="ASCII"/>
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateBundledVersionsProps" DependsOnTargets="SetupBundledComponents">
|
||||
|
|
Loading…
Add table
Reference in a new issue