Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/credfeto/updatepackages

Dotnet tool for updating packages automatically
https://github.com/credfeto/updatepackages

Last synced: about 1 month ago
JSON representation

Dotnet tool for updating packages automatically

Awesome Lists containing this project

README

        

## UpdatePackages

Command line tool for updating nuget packages across a solution/folder which can be scripted as part of an automated
build.

## Build Status

| Branch | Status |
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| main | [![Build: Pre-Release](https://github.com/credfeto/UpdatePackages/actions/workflows/build-and-publish-pre-release.yml/badge.svg)](https://github.com/credfeto/UpdatePackages/actions/workflows/build-and-publish-pre-release.yml) |
| release | [![Build: Release](https://github.com/credfeto/UpdatePackages/actions/workflows/build-and-publish-release.yml/badge.svg)](https://github.com/credfeto/UpdatePackages/actions/workflows/build-and-publish-release.yml) |

## Release Notes

See [CHANGELOG.md](CHANGELOG.md) for release notes.

## Installation

### Install as a global tool

```shell
dotnet tool install Credfeto.Package.Update
```

To update to latest released version

```shell
dotnet tool update Credfeto.Package.Update
```

### Install as a local tool

```shell
dotnet new tool-manifest
dotnet tool install Credfeto.Package.Update --local
```

To update to latest released version

```shell
dotnet tool update Credfeto.Package.Update --local
```

## Usage

### Updating packages

Note the tool returns a non-zero exit code if any packages are updated.

Also provides in the output the packages that were updated in the format below so that scripts can read the output and
take action.

```
::set-env name=PackageId::Version
```

e.g:

```
::set-env name=Credfeto.Extensions.Configuration.Typed::1.2.3.4
::set-env name=Credfeto.Extensions.Caching::3.4.5.6
```

#### Update a specific package

```shell
dotnet updatepackages --folder D:\Source --package-id Credfeto.Extensions.Configuration.Typed
```

#### Update all packages that start with a prefix

```shell
dotnet updatepackages --folder D:\Source --package-id Credfeto.Extensions:prefix
```

#### Update all packages that start with a prefix, excluding a specific packages

```shell
dotnet updatepackages --folder D:\Source --package-id Credfeto.Extensions:prefix --exclude Credfeto.Extensions.Configuration.Json Credfeto.Extensions.Configuration.Typed
```

#### Add an additional package source

```shell
dotnet updatepackages --folder D:\Source --package-id Credfeto.Extensions:prefix --source https://nuget.example.org/api/v3/index.json
```

## Contributors