Use different moniker for the new distros

This commit is contained in:
Matt Ellis 2016-05-27 00:44:31 -07:00 committed by Livar Cunha
parent 7963018d3d
commit 6ccc40e146
2 changed files with 14 additions and 4 deletions

View file

@ -38,6 +38,6 @@
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64"
"fedora.23-x64": {}
}
}

View file

@ -1,4 +1,5 @@
using Microsoft.DotNet.Cli.Build.Framework;
using Microsoft.DotNet.InternalAbstractions;
using System;
using System.Collections.Generic;
using System.Linq;
@ -15,9 +16,18 @@ namespace Microsoft.DotNet.Cli.Build
public static string GetProductMoniker(BuildTargetContext c, string artifactPrefix, string version)
{
string osname = GetOSShortName();
var arch = CurrentArchitecture.Current.ToString();
return $"{artifactPrefix}-{osname}-{arch}.{version}";
string rid = RuntimeEnvironment.GetRuntimeIdentifier();
if (rid == "ubuntu.16.04-x64" || rid == "fedora.23-x64" || rid == "opensuse.13.2-x64")
{
return $"{artifactPrefix}-{rid}.{version}";
}
else
{
string osname = GetOSShortName();
var arch = CurrentArchitecture.Current.ToString();
return $"{artifactPrefix}-{osname}-{arch}.{version}";
}
}
public static string GetDebianPackageName(BuildTargetContext c)