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
|
@ -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