2016-03-07 20:20:50 +00:00
|
|
|
|
using Microsoft.DotNet.Cli.Build.Framework;
|
2016-08-08 22:35:25 +00:00
|
|
|
|
using Microsoft.DotNet.PlatformAbstractions;
|
2016-03-07 20:20:50 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Build
|
|
|
|
|
{
|
|
|
|
|
public class Monikers
|
|
|
|
|
{
|
2016-05-30 05:38:14 +00:00
|
|
|
|
public static string GetBadgeMoniker()
|
|
|
|
|
{
|
|
|
|
|
switch (RuntimeEnvironment.GetRuntimeIdentifier())
|
|
|
|
|
{
|
|
|
|
|
case "ubuntu.16.04-x64":
|
|
|
|
|
return "Ubuntu_16_04_x64";
|
|
|
|
|
case "fedora.23-x64":
|
|
|
|
|
return "Fedora_23_x64";
|
|
|
|
|
case "opensuse.13.2-x64":
|
|
|
|
|
return "openSUSE_13_2_x64";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $"{CurrentPlatform.Current}_{CurrentArchitecture.Current}";
|
|
|
|
|
}
|
2016-07-19 21:01:02 +00:00
|
|
|
|
|
2016-03-07 20:20:50 +00:00
|
|
|
|
public static string GetOSShortName()
|
|
|
|
|
{
|
|
|
|
|
string osname = "";
|
|
|
|
|
switch (CurrentPlatform.Current)
|
|
|
|
|
{
|
|
|
|
|
case BuildPlatform.Windows:
|
|
|
|
|
osname = "win";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
osname = CurrentPlatform.Current.ToString().ToLower();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return osname;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|