Skip to content

Waits for a new version of a NuGet package to be published

License

Notifications You must be signed in to change notification settings

martincostello/wait-for-nuget-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

WaitForNuGetPackage ⌛📦

NuGet NuGet Downloads

Build status codecov OpenSSF Scorecard

Introduction

Waits for a new version of a NuGet package to be published.

Quick Start

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

Examples

Wait for a new version of a package to be published

dotnet wait-for-package MyPackage

Wait for a new version of a multiple packages to be published

dotnet wait-for-package MyPackage.Core MyPackage.Data MyPackage.UI

Wait for a specific version of a package to be published

dotnet wait-for-package MyPackage@1.2.3

Wait no more than 15 minutes for a new version of a package to be published

dotnet wait-for-package MyPackage --timeout 00:15:00

Wait for any new version of a package to have be published within the last 30 minutes

dotnet wait-for-package MyPackage --since 00:30:00

Wait for a new version of a package to be published to a custom NuGet feed

Note

Your custom NuGet feed must implement the NuGet Catalog resource.

dotnet wait-for-package MyPackage --service-index https://corp.local/nuget/index.json

Options

> 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

Building and Testing

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

Feedback

Any feedback or issues can be added to the issues for this project in GitHub.

Repository

The repository is hosted in GitHub: https://github.com/martincostello/wait-for-nuget-package.git

License

This project is licensed under the Apache 2.0 license.