2017-03-08 19:10:53 +00:00
|
|
|
<Project ToolsVersion="15.0">
|
|
|
|
<Target Name="WriteBuildInfoProps"
|
|
|
|
DependsOnTargets="BuildDotnetCliBuildFramework">
|
|
|
|
|
|
|
|
<GetCurrentRuntimeInformation>
|
|
|
|
<Output TaskParameter="Rid" PropertyName="HostRid" />
|
|
|
|
<Output TaskParameter="OSName" PropertyName="HostOSName" />
|
2017-03-24 20:07:54 +00:00
|
|
|
<Output TaskParameter="OSPlatform" PropertyName="HostOSPlatform" />
|
2017-03-08 19:10:53 +00:00
|
|
|
</GetCurrentRuntimeInformation>
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<Rid Condition=" '$(Rid)' == '' ">$(HostRid)</Rid>
|
|
|
|
<Architecture Condition=" '$(Architecture)' == '' ">x64</Architecture>
|
|
|
|
<OSName Condition=" '$(OSName)' == '' ">$(HostOSName)</OSName>
|
2017-03-24 20:07:54 +00:00
|
|
|
<OSPlatform Condition=" '$(OSPlatform)' == '' ">$(HostOSPlatform)</OSPlatform>
|
2017-03-08 19:10:53 +00:00
|
|
|
|
|
|
|
<BuildInfoPropsContent>
|
|
|
|
<Project ToolsVersion="15.0">
|
|
|
|
<PropertyGroup>
|
|
|
|
<Rid>$(Rid)</Rid>
|
|
|
|
<Architecture>$(Architecture)</Architecture>
|
|
|
|
<OSName>$(OSName)</OSName>
|
2017-03-24 20:07:54 +00:00
|
|
|
<OSPlatform>$(OSPlatform)</OSPlatform>
|
2017-03-08 19:10:53 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
</Project>
|
|
|
|
</BuildInfoPropsContent>
|
|
|
|
|
|
|
|
<ExistingBuildInfoPropsContent Condition=" Exists('$(BuildInfoProps)') ">
|
|
|
|
$([System.IO.File]::ReadAllText($(BuildInfoProps)))
|
|
|
|
</ExistingBuildInfoPropsContent>
|
|
|
|
|
|
|
|
<ShouldOverwriteBuildInfoPropsFile>false</ShouldOverwriteBuildInfoPropsFile>
|
|
|
|
<ShouldOverwriteBuildInfoPropsFile
|
|
|
|
Condition=" '$(ExistingBuildInfoPropsContent.Trim())' != '$(BuildInfoPropsContent.Trim())' ">true</ShouldOverwriteBuildInfoPropsFile>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<WriteLinesToFile File="$(BuildInfoProps)"
|
|
|
|
Lines="$(BuildInfoPropsContent)"
|
|
|
|
Condition=" '$(ShouldOverwriteBuildInfoPropsFile)' == 'true' "
|
|
|
|
Overwrite="true" />
|
|
|
|
</Target>
|
|
|
|
</Project>
|