First pass at dotnet-pack

- Ported nuget package building code over from dnu. Moved that code to use NuGet v3 primitives.
- Simplified the package builder API
- Left out resources and schema detection for now
- This folder should remain self contained as the code will be copied into NuGet v3.
- Missing features include symbols packages
This commit is contained in:
David Fowler 2015-11-12 03:50:38 -08:00
parent ba3f0745e3
commit df3a5fba7a
23 changed files with 1870 additions and 18 deletions

View file

@ -268,9 +268,7 @@ namespace Microsoft.DotNet.Tools.Compiler
runtimeContext.CreateExporter(configuration));
}
PrintSummary(diagnostics, sw, success);
return success;
return PrintSummary(diagnostics, sw, success);
}
private static string GetProjectOutput(Project project, NuGetFramework framework, string configuration, string outputPath)
@ -433,7 +431,7 @@ namespace Microsoft.DotNet.Tools.Compiler
return "\"" + input.Replace("\\", "\\\\").Replace("\"", "\\\"") + "\"";
}
private static void PrintSummary(List<DiagnosticMessage> diagnostics, Stopwatch sw, bool success = true)
private static bool PrintSummary(List<DiagnosticMessage> diagnostics, Stopwatch sw, bool success = true)
{
PrintDiagnostics(diagnostics);
@ -445,6 +443,7 @@ namespace Microsoft.DotNet.Tools.Compiler
if (errorCount > 0 || !success)
{
Reporter.Output.WriteLine("Compilation failed.".Red());
success = false;
}
else
{
@ -458,6 +457,8 @@ namespace Microsoft.DotNet.Tools.Compiler
Reporter.Output.WriteLine($"Time elapsed {sw.Elapsed}");
Reporter.Output.WriteLine();
return success;
}
private static bool AddResources(Project project, List<string> compilerArgs, string intermediateOutputPath)