Fix Package targets to respect the new CLI SDK layout.
This commit is contained in:
parent
4d19e4d866
commit
5150bae60c
10 changed files with 100 additions and 291 deletions
|
@ -8,6 +8,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
public class Monikers
|
||||
{
|
||||
public const string SharedFrameworkName = "Microsoft.NETCore.App";
|
||||
|
||||
public static string GetProductMoniker(BuildTargetContext c, string artifactPrefix)
|
||||
{
|
||||
string osname = GetOSShortName();
|
||||
|
@ -31,7 +33,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
case "rtm":
|
||||
packageName = "dotnet";
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
throw new Exception($"Unknown channel - {channel}");
|
||||
}
|
||||
|
||||
|
@ -42,7 +44,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
var sharedFrameworkNugetVersion = c.BuildContext.Get<string>("SharedFrameworkNugetVersion");
|
||||
|
||||
return $"dotnet-sharedframework-{SharedFrameworkTargets.SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
||||
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
||||
}
|
||||
|
||||
public static string GetOSShortName()
|
||||
|
|
|
@ -101,8 +101,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
}
|
||||
|
||||
public static void CopyDirectoryRecursively(string path, string destination)
|
||||
public static void CopyDirectoryRecursively(string path, string destination, bool keepParentDir = false)
|
||||
{
|
||||
if (keepParentDir)
|
||||
{
|
||||
path = path.TrimEnd(Path.DirectorySeparatorChar);
|
||||
destination = Path.Combine(destination, Path.GetFileName(path));
|
||||
Directory.CreateDirectory(destination);
|
||||
}
|
||||
|
||||
foreach (var file in Directory.GetFiles(path, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
string destFile = file.Replace(path, destination);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue