Remove the shared runtime folder from the CLI
This commit is contained in:
parent
34b0b688f7
commit
528b32ddc5
5 changed files with 1 additions and 80 deletions
|
@ -31,11 +31,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public static readonly string[] FilesToClean = new[]
|
||||
{
|
||||
"README.md",
|
||||
"Microsoft.DotNet.Runtime.exe",
|
||||
"Microsoft.DotNet.Runtime.dll",
|
||||
"Microsoft.DotNet.Runtime.deps",
|
||||
"Microsoft.DotNet.Runtime.pdb"
|
||||
"README.md"
|
||||
};
|
||||
|
||||
public static readonly string[] ProjectsToPack = new[]
|
||||
|
@ -161,10 +157,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
var configuration = c.BuildContext.Get<string>("Configuration");
|
||||
var binDir = Path.Combine(outputDir, "bin");
|
||||
var runtimeOutputDir = Path.Combine(outputDir, "runtime", "coreclr");
|
||||
|
||||
Mkdirp(binDir);
|
||||
Mkdirp(runtimeOutputDir);
|
||||
|
||||
foreach (var project in ProjectsToPublish)
|
||||
{
|
||||
|
@ -179,31 +173,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
.EnsureSuccessful();
|
||||
}
|
||||
|
||||
// Publish the runtime
|
||||
dotnet.Publish(
|
||||
"--output",
|
||||
runtimeOutputDir,
|
||||
"--configuration",
|
||||
configuration,
|
||||
Path.Combine(c.BuildContext.BuildDirectory, "src", "Microsoft.DotNet.Runtime"))
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
// Clean bogus files
|
||||
foreach (var fileToClean in FilesToClean)
|
||||
{
|
||||
var pathToClean = Path.Combine(runtimeOutputDir, fileToClean);
|
||||
if (File.Exists(pathToClean))
|
||||
{
|
||||
File.Delete(pathToClean);
|
||||
}
|
||||
}
|
||||
|
||||
FixModeFlags(outputDir);
|
||||
|
||||
// Copy the whole runtime local to the tools
|
||||
CopyRecursive(runtimeOutputDir, binDir);
|
||||
|
||||
// Copy corehost
|
||||
File.Copy(Path.Combine(Dirs.Corehost, $"corehost{Constants.ExeSuffix}"), Path.Combine(binDir, $"corehost{Constants.ExeSuffix}"), overwrite: true);
|
||||
File.Copy(Path.Combine(Dirs.Corehost, $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}"), Path.Combine(binDir, $"{Constants.DynamicLibPrefix}hostpolicy{Constants.DynamicLibSuffix}"), overwrite: true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue