Skip to content

Commit

Permalink
BundledVersions: update portable rid logic (backport dotnet#14647)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayakael committed Nov 5, 2022
1 parent dd13351 commit 983878f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/redist/targets/GetRuntimeInformation.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
<HostOSName Condition=" '$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) ">osx</HostOSName>
<HostOSName Condition=" '$(HostOSName)' == '' AND $([MSBuild]::IsOSPlatform('FREEBSD')) ">freebsd</HostOSName>
<HostOSName Condition=" '$(HostOSName)' == '' AND '$(IsLinux)' == 'True' ">linux</HostOSName>


<OSName Condition=" '$(OSName)' == '' AND $(Rid) != '' ">$(Rid.Substring(0, $(Rid.LastIndexOf('-'))))</OSName>
<OSName Condition=" '$(OSName)' == '' ">$(HostOSName)</OSName>

<Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
<PortableOSName Condition=" '$(PortableOSName)' == '' ">$(OSName)</PortableOSName>

<Rid>$(OSName)-$(Architecture)</Rid>

<PortableRid>$(PortableOSName)-$(Architecture)</PortableRid>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -23,10 +28,9 @@
</PropertyGroup>

<PropertyGroup>
<ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' OR
'$(Rid)' == 'rhel.6-x64' OR
'$(Rid)' == 'linux-musl-x64' ">$(Rid)</ProductMonikerRid>
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
<ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(Rid)</ProductMonikerRid>

<PortableProductMonikerRid Condition=" '$(PortableProductMonikerRid)' == '' ">$(PortableRid)</PortableProductMonikerRid>

<PortableProductMonikerRid Condition=" '$(PortableProductMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</PortableProductMonikerRid>

Expand Down

0 comments on commit 983878f

Please sign in to comment.