Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .NET package search to Cake scripts #4320

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

paulomorgado
Copy link
Contributor

The (NuGet CLI) commands list and search do not exist in dotnet nuget.

This PR introduces DotNetSearchPackage that uses dotnet package search as an alternative to NuGetList for environments that do not have nuget.exe but have dotnet.exe.

@paulomorgado paulomorgado force-pushed the DotNetSearchPackage branch 2 times, most recently from fa1b291 to c845b9f Compare June 26, 2024 19:33
@paulomorgado paulomorgado reopened this Jul 3, 2024
@paulomorgado
Copy link
Contributor Author

@devlead, I can't figure out how the build errors are related to this PR's changes.

This commit introduces a significant enhancement to the Cake build automation system by adding support for .NET package search directly within Cake build scripts. The implementation includes the introduction of a new method `DotNetSearchPackage` along with several new classes (`DotNetPackageSearcher`, `DotNetPackageSearchItem`, `DotNetPackageSearchSettings`) designed to facilitate the search for .NET packages using various settings and parameters.

Additionally, this update includes the creation of unit tests and fixtures (`DotNetPackageSearcherFixture`, `DotNetPackageSearcherTests`, `DotNetPackageSearchSettingsTests`) to ensure the reliability and correctness of the package search functionality. A new configuration file (`Cake.lutconfig`) has been added to support live unit testing within the project, optimizing the development workflow.

The changes also encompass updates to the namespace and using directives, specifically adding `using Cake.Common.Tools.DotNet.Package.Search;` in `DotNetAliases.cs` and introducing a new namespace `Cake.Common.Tools.DotNet.Package.Search` for better organization of the new functionality.

Comprehensive XML documentation comments have been included to provide clear examples and guidance on how to utilize the new package search feature within Cake build scripts, aiming to enhance the developer experience by making it easier to find and reference .NET packages during the build process.
@devlead devlead linked an issue Sep 26, 2024 that may be closed by this pull request
@devlead devlead merged commit 575790d into cake-build:develop Sep 26, 2024
13 of 14 checks passed
@devlead
Copy link
Member

devlead commented Sep 26, 2024

Your changes have been merged, thanks for your contribution 👍

@paulomorgado paulomorgado deleted the DotNetSearchPackage branch September 26, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add DotNetSearchPackage Alias for dotnet package search
2 participants