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>
|
2017-06-08 07:12:42 +00:00
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<IsLinux Condition = " '$(HostOSName)' != 'win' AND '$(HostOSName)' != 'osx' ">True</IsLinux>
|
|
|
|
<Rid Condition=" '$(Rid)' == '' AND '$(IsLinux)' != 'True' ">$(HostRid)</Rid>
|
|
|
|
<Architecture Condition=" '$(Architecture)' == '' AND '$(IsLinux)' != 'True' ">x64</Architecture>
|
|
|
|
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSName)</OSName>
|
|
|
|
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' != 'True' ">$(HostOSPlatform)</OSPlatform>
|
|
|
|
|
|
|
|
<Rid Condition=" '$(Rid)' == '' AND '$(IsLinux)' == 'True' ">linux-x64</Rid>
|
|
|
|
<Architecture Condition=" '$(Architecture)' == '' AND '$(IsLinux)' == 'True' ">x64</Architecture>
|
|
|
|
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' == 'True' ">linux</OSName>
|
|
|
|
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' == 'True' ">linux</OSPlatform>
|
|
|
|
|
|
|
|
<BuildInfoPropsContent>
|
2017-09-05 21:44:25 +00:00
|
|
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2017-03-08 19:10:53 +00:00
|
|
|
<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>
|