Merge pull request #3429 from eerhardt/FixUbuntuRel
Fix Ubuntu build break.
This commit is contained in:
commit
cd0f847cd7
4 changed files with 17 additions and 51 deletions
14
build_projects/dotnet-cli-build/CliMonikers.cs
Normal file
14
build_projects/dotnet-cli-build/CliMonikers.cs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
using Microsoft.DotNet.Cli.Build.Framework;
|
||||||
|
|
||||||
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
|
{
|
||||||
|
public static class CliMonikers
|
||||||
|
{
|
||||||
|
public static string GetSdkDebianPackageName(BuildTargetContext c)
|
||||||
|
{
|
||||||
|
var nugetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
|
|
||||||
|
return $"dotnet-dev-{nugetVersion}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,7 +24,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c)
|
public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
||||||
var packageName = Monikers.GetSdkDebianPackageName(c);
|
var packageName = CliMonikers.GetSdkDebianPackageName(c);
|
||||||
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
var debFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
var debFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||||
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages");
|
||||||
|
@ -116,7 +116,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
IEnumerable<string> orderedPackageNames = new List<string>()
|
IEnumerable<string> orderedPackageNames = new List<string>()
|
||||||
{
|
{
|
||||||
Monikers.GetSdkDebianPackageName(c),
|
CliMonikers.GetSdkDebianPackageName(c),
|
||||||
Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion),
|
Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion),
|
||||||
Monikers.GetDebianSharedHostPackageName(c)
|
Monikers.GetDebianSharedHostPackageName(c)
|
||||||
};
|
};
|
||||||
|
|
|
@ -276,7 +276,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
var version = CliNuGetVersion;
|
var version = CliNuGetVersion;
|
||||||
|
|
||||||
var packageName = Monikers.GetSdkDebianPackageName(c);
|
var packageName = CliMonikers.GetSdkDebianPackageName(c);
|
||||||
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||||
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version);
|
||||||
|
|
||||||
|
|
|
@ -45,54 +45,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
return $"{CurrentPlatform.Current}_{CurrentArchitecture.Current}";
|
return $"{CurrentPlatform.Current}_{CurrentArchitecture.Current}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetDebianPackageName(BuildTargetContext c)
|
|
||||||
{
|
|
||||||
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
|
||||||
var packageName = "";
|
|
||||||
switch (channel)
|
|
||||||
{
|
|
||||||
case "dev":
|
|
||||||
packageName = "dotnet-nightly";
|
|
||||||
break;
|
|
||||||
case "beta":
|
|
||||||
case "rc1":
|
|
||||||
case "rc2":
|
|
||||||
case "preview":
|
|
||||||
case "rtm":
|
|
||||||
packageName = "dotnet";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Exception($"Unknown channel - {channel}");
|
|
||||||
}
|
|
||||||
|
|
||||||
return packageName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetSdkDebianPackageName(BuildTargetContext c)
|
|
||||||
{
|
|
||||||
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
|
||||||
var nugetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
|
||||||
|
|
||||||
var packagePrefix = "";
|
|
||||||
switch (channel)
|
|
||||||
{
|
|
||||||
case "dev":
|
|
||||||
packagePrefix = "dotnet-nightly";
|
|
||||||
break;
|
|
||||||
case "beta":
|
|
||||||
case "rc1":
|
|
||||||
case "rc2":
|
|
||||||
case "preview":
|
|
||||||
case "rtm":
|
|
||||||
packagePrefix = "dotnet";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Exception($"Unknown channel - {channel}");
|
|
||||||
}
|
|
||||||
|
|
||||||
return $"{packagePrefix}-dev-{nugetVersion}";
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetDebianSharedFrameworkPackageName(string sharedFrameworkNugetVersion)
|
public static string GetDebianSharedFrameworkPackageName(string sharedFrameworkNugetVersion)
|
||||||
{
|
{
|
||||||
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
||||||
|
|
Loading…
Reference in a new issue