adamralph / bau-nuget

A Bau plugin for running NuGet commands
MIT License
2 stars 1 forks source link

Support multiple requests. #6

Closed aarondandy closed 9 years ago

aarondandy commented 9 years ago

The current implementation only supports one NuGet operation per BauTask. The fluent interface as well as the Task implementations should be rearrange to support this.

.NuGetPack("pack").DependsOn("build", "clobber", "output").Do(nuget => nuget
    .For("file1.nuspec", "file2.csproj", "file3.nuspec") // IEnuerable<string>
    .WithOutputDirectory(output)
    .WithProperty("Configuration","Release")
    .WithIncludeReferencedProjects()
    .WithVerbosity(nugetVerbosity)
    .WithVersion(version + versionSuffix))

My current thoughts are that after #5 is complete a NuGetBauTaskBase would just store a collection of requests that would all be executed in the BauTask OnActionsExecuted()

The For() method (likely an extension method) would need to accept IEnumerable<string> as well as params string[]. For each target file a request would be created, queued with the task and then returned for use with fluent operations.