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
|
@ -94,9 +94,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[BuildPlatforms(BuildPlatform.Windows)]
|
||||
public static BuildTargetResult GenerateCliSdkMsi(BuildTargetContext c)
|
||||
{
|
||||
var cliSdkRoot = c.BuildContext.Get<string>("CLISDKRoot");
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "generatemsi.ps1"),
|
||||
Dirs.Stage2, SdkMsi, WixRoot, MsiVersion, CliVersion, Arch, Channel)
|
||||
cliSdkRoot, SdkMsi, WixRoot, MsiVersion, CliVersion, Arch, Channel)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
return c.Success();
|
||||
|
@ -156,7 +157,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
Cmd("powershell", "-NoProfile", "-NoLogo",
|
||||
Path.Combine(Dirs.RepoRoot, "packaging", "windows", "generatebundle.ps1"),
|
||||
SdkMsi, SdkBundle, WixRoot, MsiVersion, CliVersion, Arch, Channel)
|
||||
SdkMsi, SharedFrameworkMsi, SharedHostMsi, SdkBundle, WixRoot, MsiVersion, CliVersion, Arch, Channel)
|
||||
.EnvironmentVariable("Stage2Dir", Dirs.Stage2)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
|
|
@ -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