Merge pull request #7088 from johnbeisner/CoherentBadgeFix

Publishing a 'coherent' badge; part 2
This commit is contained in:
jbeisner 2017-07-06 11:58:16 -07:00 committed by GitHub
commit cd0c7741ae
3 changed files with 28 additions and 23 deletions

View file

@ -5,12 +5,14 @@
<Import Project="$(MSBuildThisFileDirectory)/publish/PublishDebian.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/Badge.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/Checksum.targets" />
<Import Project="$(MSBuildThisFileDirectory)/publish/RuntimeCoherence.targets" />
<!-- PUBLISH_TO_AZURE_BLOB env variable set by CI -->
<Target Name="Publish"
Condition=" '$(PUBLISH_TO_AZURE_BLOB)' != '' "
DependsOnTargets="Init;
Package;
EvaluateRuntimeCoherence;
PublishArtifacts;
FinishBuild" />

View file

@ -2,7 +2,6 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="FinishBuild"
DependsOnTargets="CheckIfAllBuildsHavePublished;
EvaluateRuntimeCoherence;
FinalizeBuild" />
<Target Name="CheckIfAllBuildsHavePublished">
@ -14,27 +13,6 @@
<Output TaskParameter="HaveAllBuildsPublished" PropertyName="HaveAllBuildsPublished" />
</CheckIfAllBuildsHavePublished>
</Target>
<Target Name="EvaluateRuntimeCoherence"
DependsOnTargets="ReadAspNetCoreSharedRuntimeVersionFile"
BeforeTargets="FinalizeBuild">
<PropertyGroup>
<Coherent>false</Coherent>
<Coherent Condition=" '$(CLI_SharedFrameworkVersion)' == '@(AspNetCoreSharedRuntimeVersion)' ">true</Coherent>
</PropertyGroup>
</Target>
<Target Name="ReadAspNetCoreSharedRuntimeVersionFile"
DependsOnTargets="DownloadHostAndSharedFxArtifacts">
<ItemGroup>
<File Include="$(AspNetCoreSharedRuntimeVersionFile)" />
</ItemGroup>
<ReadLinesFromFile File="@(File)">
<Output
TaskParameter="Lines"
ItemName="AspNetCoreSharedRuntimeVersion"/>
</ReadLinesFromFile>
</Target>
<Target Name="FinalizeBuild"
Condition=" '$(HaveAllBuildsPublished)' == 'True' ">

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="EvaluateRuntimeCoherence"
DependsOnTargets="ReadAspNetCoreSharedRuntimeVersionFile;
CompareRuntimeVersions" />
<Target Name="ReadAspNetCoreSharedRuntimeVersionFile"
DependsOnTargets="DownloadHostAndSharedFxArtifacts">
<ItemGroup>
<File Include="$(AspNetCoreSharedRuntimeVersionFile)" />
</ItemGroup>
<ReadLinesFromFile File="@(File)">
<Output
TaskParameter="Lines"
ItemName="AspNetCoreSharedRuntimeVersion"/>
</ReadLinesFromFile>
</Target>
<Target Name="CompareRuntimeVersions">
<PropertyGroup>
<Coherent>false</Coherent>
<Coherent Condition=" '$(CLI_SharedFrameworkVersion)' == '@(AspNetCoreSharedRuntimeVersion)' ">true</Coherent>
</PropertyGroup>
</Target>
</Project>