Create dotnet bundle with CLI SDK, SharedFx MSI and Shared Host MSI.
This commit is contained in:
parent
00be1e5c16
commit
dea1e3242d
6 changed files with 47 additions and 11 deletions
|
@ -22,6 +22,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target(nameof(PrepareTargets.Init),
|
||||
nameof(PackageTargets.InitPackage),
|
||||
nameof(PackageTargets.GenerateVersionBadge),
|
||||
nameof(PackageTargets.CopyCLISDKLayout),
|
||||
nameof(SharedFrameworkTargets.PublishSharedHost),
|
||||
nameof(SharedFrameworkTargets.PublishSharedFramework),
|
||||
nameof(PackageTargets.GenerateCompressedFile),
|
||||
|
@ -47,6 +48,30 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult CopyCLISDKLayout(BuildTargetContext c)
|
||||
{
|
||||
var nugetVersion = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||
var cliSdkRoot = Path.Combine(Dirs.Output, "obj", "clisdk");
|
||||
var cliSdk = Path.Combine(cliSdkRoot, "sdk", nugetVersion);
|
||||
|
||||
if (Directory.Exists(cliSdkRoot))
|
||||
{
|
||||
Directory.Delete(cliSdkRoot, true);
|
||||
}
|
||||
|
||||
Directory.CreateDirectory(cliSdk);
|
||||
|
||||
foreach (var file in Directory.GetFiles(Dirs.Stage2, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
string destFile = Path.Combine(cliSdk, Path.GetFileName(file));
|
||||
File.Copy(file, destFile, true);
|
||||
}
|
||||
|
||||
c.BuildContext["CLISDKRoot"] = cliSdkRoot;
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PackageTargets.GenerateZip), nameof(PackageTargets.GenerateTarBall))]
|
||||
public static BuildTargetResult GenerateCompressedFile(BuildTargetContext c)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue