Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.
Merged
17 changes: 10 additions & 7 deletions build/Publish.targets
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@

<!-- UploadToAzure target comes from Build Tools -->
<Target Name="PublishArtifacts"
DependsOnTargets="GenerateVersionBadge;
GatherItemsForPattern;
GenerateChecksums;
UploadArtifactsToAzure;
UploadChecksumsToAzure;
PublishDebFilesToDebianRepo;
PublishCliVersionBadge" />
DependsOnTargets="GenerateVersionBadge;
GenerateCoherentBadge;
GatherItemsForPattern;
GenerateChecksums;
UploadArtifactsToAzure;
UploadChecksumsToAzure;
PublishDebFilesToDebianRepo;
PublishCliVersionBadge" />

<Target Name="GatherItemsForPattern">
<ItemGroup>
Expand All @@ -44,6 +45,8 @@
<Target Name="PublishCliVersionBadge">
<ItemGroup>
<CliVersionBadgeToUpload Include="$(VersionBadge)" />
<CliVersionBadgeToUpload Include="$(CoherentBadge)"
Condition=" '$(Coherent)' == 'true' " />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion build/VersionBadge.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<VersionBadgeMoniker Condition=" '$(HostRid)' == 'ubuntu.16.10-x64' ">ubuntu_16_10_x64</VersionBadgeMoniker>
<VersionBadgeMoniker Condition=" '$(IslinuxPortable)' == 'true' ">linux_x64</VersionBadgeMoniker>

<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
<CoherentBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg</CoherentBadge>
</PropertyGroup>
</Project>
12 changes: 12 additions & 0 deletions build/publish/Badge.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@
ReplacementPatterns="ver_number"
ReplacementStrings="$(SdkVersion)" />
</Target>

<Target Name="GenerateCoherentBadge"
DependsOnTargets="Init; EvaluateRuntimeCoherence"
Condition=" '$(Coherent)' == 'true' ">
<Message Text="$(CoherentBadge)" />

<ReplaceFileContents
InputFile="$(VersionSvgTemplate)"
DestinationFile="$(CoherentBadge)"
ReplacementPatterns="ver_number"
ReplacementStrings="$(SdkVersion)" />
</Target>
</Project>