Waits for a new version of a NuGet package to be published.
To install the tool and wait for a NuGet package to be published and be available for package restore and visible in search results, run the following commands:
dotnet tool install --global MartinCostello.WaitForNuGetPackage
# Create a NuGet package and publish it to NuGet.org
dotnet pack MyPackage --output .
dotnet nuget push "*.nupkg" --source https://api.nuget.org/v3/index.json
# Wait for the package to be published and indexed
dotnet wait-for-package MyPackage
dotnet wait-for-package MyPackage
dotnet wait-for-package MyPackage.Core MyPackage.Data MyPackage.UI
dotnet wait-for-package MyPackage@1.2.3
dotnet wait-for-package MyPackage --timeout 00:15:00
dotnet wait-for-package MyPackage --since 00:30:00
Note
Your custom NuGet feed must implement the NuGet Catalog resource.
dotnet wait-for-package MyPackage --service-index https://corp.local/nuget/index.json
> dotnet wait-for-package --help
USAGE:
dotnet wait-for-package [package-id] [OPTIONS]
EXAMPLES:
dotnet wait-for-package MyCompany.MyProduct
dotnet wait-for-package MyCompany.MyProduct@1.2.3
dotnet wait-for-package MyCompany.MyProduct MyCompany.MyOtherProduct@1.2.3 --timeout 00:15:00
ARGUMENTS:
[package-id] The package ID(s), including an optional version, to wait for new versions to be published
OPTIONS:
DEFAULT
-h, --help Prints help information
-v, --version Prints version information
-q, --no-logo Suppresses the logo
-i, --service-index The NuGet service index URL to use
-s, --since 00:05:00 The period of time before now to include when searching for the published
package(s)
-t, --timeout The period of time to wait for the package(s) to be published
--verbose Enables verbose logging
Compiling the application yourself requires Git and the .NET SDK to be installed.
To build and test the application locally from a terminal/command-line, run the following set of commands:
git clone https://github.com/martincostello/wait-for-nuget-package.git
cd wait-for-nuget-package
./build.ps1
Any feedback or issues can be added to the issues for this project in GitHub.
The repository is hosted in GitHub: https://github.com/martincostello/wait-for-nuget-package.git
This project is licensed under the Apache 2.0 license.