dotnet-installer/build/publish/Badge.targets

42 lines
1.7 KiB
Text
Raw Normal View History

2016-07-12 23:52:58 +00:00
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2017-02-23 00:19:56 +00:00
<PropertyGroup>
<VersionSvgTemplate>$(RepoRoot)/resources/images/version_badge.svg</VersionSvgTemplate>
</PropertyGroup>
2016-07-12 23:52:58 +00:00
<Target Name="GenerateVersionBadge"
DependsOnTargets="Init">
<Message Text="$(VersionBadge)" />
<ReplaceFileContents
InputFile="$(VersionSvgTemplate)"
DestinationFile="$(VersionBadge)"
ReplacementPatterns="ver_number"
ReplacementStrings="$(SdkVersion)" />
</Target>
2017-06-30 19:17:20 +00:00
<Target Name="GenerateCoherentBadge"
DependsOnTargets="Init; EvaluateRuntimeCoherence"
Condition=" '$(Coherent)' == 'true' ">
<Message Text="$(CoherentBadge)" />
<ReplaceFileContents
InputFile="$(VersionSvgTemplate)"
DestinationFile="$(CoherentBadge)"
ReplacementPatterns="ver_number"
ReplacementStrings="$(SdkVersion)" />
</Target>
<Target Name="SetBadgeProps">
<PropertyGroup>
<VersionBadgeMoniker>$(OSName)_$(Architecture)</VersionBadgeMoniker>
<VersionBadgeMoniker Condition=" '$(Rid)' == 'rhel.6-x64' ">rhel.6_x64</VersionBadgeMoniker>
<VersionBadgeMoniker Condition=" '$(IslinuxPortable)' == 'true' ">linux_x64</VersionBadgeMoniker>
<VersionBadgeMoniker Condition=" '$(IsBuildingAndPublishingAllLinuxDistrosNativeInstallers)' == 'true' ">all_linux_distros_native_installer</VersionBadgeMoniker>
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
<CoherentBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_coherent_badge.svg</CoherentBadge>
</PropertyGroup>
</Target>
</Project>