chocolatey / Chocolatey.Cake.Recipe

A set of convention based Cake scripts for building Chocolatey projects
Apache License 2.0
5 stars 9 forks source link

Provide ability to control globbing pattern for selection of nuspecs/nupkgs for packing/publishing #90

Closed gep13 closed 1 year ago

gep13 commented 1 year ago

Is Your Feature Request Related To A Problem? Please describe.

Within the chocolatey/choco repository, we create multiple Chocolatey packages, but we only want one of them to be published. We want the nupkgs to end up in the same folder, we just don't want them both to be published to the same repository.

Providing more fine grained control would allow project specific settings to be applied, when needed.

Describe The Solution. Why is it needed?

Currently, the globbing pattern that is used to "find" both nuspecs (for packing) and nupkgs (for publishing) is hard coded, similar to the following:

        foreach (var nuGetPackage in GetFiles(BuildParameters.Paths.Directories.NuGetPackages + "/**/*.nupkg"))
        {
            BuildParameters.BuildProvider.UploadArtifact(nuGetPackage);
        }

        foreach (var chocolateyPackage in GetFiles(BuildParameters.Paths.Directories.ChocolateyPackages + "/*.nupkg"))
        {
            BuildParameters.BuildProvider.UploadArtifact(chocolateyPackage);
        }

Additional Context.

N/A

Related Issues

N/A