Merge pull request #2272 from dotnet/brthor/ship-pdbs
Publish an Archive with the SDK Pdbs
This commit is contained in:
commit
e64d4fc81b
5 changed files with 34 additions and 2 deletions
|
@ -246,6 +246,9 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
outputDir: Dirs.Stage1);
|
||||
|
||||
CleanOutputDir(Path.Combine(Dirs.Stage1, "sdk"));
|
||||
FS.CopyRecursive(Dirs.Stage1, Dirs.Stage1Symbols);
|
||||
|
||||
RemovePdbsFromDir(Path.Combine(Dirs.Stage1, "sdk"));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -296,13 +299,23 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
CleanOutputDir(Path.Combine(Dirs.Stage2, "sdk"));
|
||||
FS.CopyRecursive(Dirs.Stage2, Dirs.Stage2Symbols);
|
||||
|
||||
RemovePdbsFromDir(Path.Combine(Dirs.Stage2, "sdk"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
private static void CleanOutputDir(string directory)
|
||||
{
|
||||
FS.RmFilesInDirRecursive(directory, "vbc.exe");
|
||||
foreach (var file in FilesToClean)
|
||||
{
|
||||
FS.RmFilesInDirRecursive(directory, file);
|
||||
}
|
||||
}
|
||||
|
||||
private static void RemovePdbsFromDir(string directory)
|
||||
{
|
||||
FS.RmFilesInDirRecursive(directory, "*.pdb");
|
||||
}
|
||||
|
||||
|
|
|
@ -175,6 +175,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile"));
|
||||
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile"));
|
||||
|
||||
CreateZipFromDirectory(Path.Combine(Dirs.Stage2Symbols, "sdk"), c.BuildContext.Get<string>("SdkSymbolsCompressedFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
|
@ -185,6 +187,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
CreateTarBallFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile"));
|
||||
CreateTarBallFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkHostCompressedFile"));
|
||||
|
||||
CreateTarBallFromDirectory(Path.Combine(Dirs.Stage2Symbols, "sdk"), c.BuildContext.Get<string>("SdkSymbolsCompressedFile"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
|
|
|
@ -130,6 +130,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
AddInstallerArtifactToContext(c, "dotnet-sharedframework", "SharedFramework", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-dev", "CombinedFrameworkSDKHost", cliVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet", "CombinedFrameworkHost", sharedFrameworkVersion);
|
||||
AddInstallerArtifactToContext(c, "dotnet-sdk-debug", "SdkSymbols", cliVersion);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
|
|
@ -68,7 +68,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
[Target(
|
||||
nameof(PublishTargets.PublishCombinedHostFrameworkArchiveToAzure),
|
||||
nameof(PublishTargets.PublishCombinedHostFrameworkSdkArchiveToAzure))]
|
||||
nameof(PublishTargets.PublishCombinedHostFrameworkSdkArchiveToAzure),
|
||||
nameof(PublishTargets.PublishSDKSymbolsArchiveToAzure))]
|
||||
public static BuildTargetResult PublishArchivesToAzure(BuildTargetContext c) => c.Success();
|
||||
|
||||
[Target(
|
||||
|
@ -176,6 +177,17 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishSDKSymbolsArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = CliNuGetVersion;
|
||||
var archiveFile = c.BuildContext.Get<string>("SdkSymbolsCompressedFile");
|
||||
|
||||
AzurePublisherTool.PublishArchiveAndLatest(archiveFile, Channel, version);
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult PublishCombinedHostFrameworkArchiveToAzure(BuildTargetContext c)
|
||||
{
|
||||
|
|
|
@ -17,8 +17,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public static readonly string Packages = Path.Combine(Output, "packages");
|
||||
public static readonly string Stage1 = Path.Combine(Output, "stage1");
|
||||
public static readonly string Stage1Compilation = Path.Combine(Output, "stage1compilation");
|
||||
public static readonly string Stage1Symbols = Path.Combine(Output, "stage1symbols");
|
||||
public static readonly string Stage2 = Path.Combine(Output, "stage2");
|
||||
public static readonly string Stage2Compilation = Path.Combine(Output, "stage2compilation");
|
||||
public static readonly string Stage2Symbols = Path.Combine(Output, "stage2symbols");
|
||||
public static readonly string Corehost = Path.Combine(Output, "corehost");
|
||||
public static readonly string TestOutput = Path.Combine(Output, "tests");
|
||||
public static readonly string TestArtifacts = Path.Combine(TestOutput, "artifacts");
|
||||
|
|
Loading…
Reference in a new issue