Coder Social home page Coder Social logo

skaempfer / dotnet-project-version-updater Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 103 KB

dotnet tool that helps you update a project's version along with the version of all projects that depend on it.

License: MIT License

C# 98.93% PowerShell 1.07%
csharp dotnet tool versioning versioning-strategies versioning-workflow

dotnet-project-version-updater's Introduction

Project Version Updater

Update a project's version with the option to also increase the version of all projects inside a solution dependening on this project.

Nuget GitHub Workflow Status (with event)

In a solution of multiple projects connected by project references that are releasable as NuGet packages it is challenging to version each project correctly: At NuGet package creation project references are converted to package references. In the process of updating a project it is therefore crucial to also update the version of all projects that depend on it. Given you have the following project graph A <== B <== C with project B dependening on project A and project C depending on project B. In case you need to update project A you automatically have to update project B and C to make them use the correct NuGet package version of the updated project A. When done by hand this update process is time-consuming and error-prone. This tool helps you achive this task fast and reliably.

Example usage:

Increase the version of project ExampleProject by one minor version and make it a prerelease. The versions of all projects within the solution which depend on this project will be increased by one patch prerelease version.

PS> dotnet update-project --update minor --prerelease --dependants .\ExampleProject.csproj

Prerequisites

  • .NET >= 8.0.100
  • PowerShell Core is recommended for running all commands in this repository

Installation

To install this tool in your workspace execute the following command:

PS> dotnet tool install --local ProjectVersionUpdater

General Usage

PS> dotnet update-project [options] <argument>

Arguments

  • ProjectPaths (required): List of paths to the project files to update.

Options

  • -s | --solution-path (optional): Path to the solution file the project(s) to update is/are part of. If omitted the next solution file relative to the first provided project path is used.
  • -u | --update (optional): Indicates which version part to increase: major, minor or patch. Defaults to 'patch' if omitted.
  • -p | --prerelease (optional): Indicates if version update should be a prerelease.
  • -n | --name (optional): Use a custom name for prerelease label. If omitted the default naming scheme 'pre' is used.
  • -d | --dependants (optional): Indicates if all projects which are (transitevely) dependent on the project to update should be updated as well.

Usage Examples

Update a project to its next major version. Update all its dependent projects to the next patch version.

PS> dotnet update-project --update major --dependants .\Project.csproj

Update a project to its next minor prerelease version. Update all its dependent projects to the next patch prerelease version.

PS> dotnet update-project --update major --prerelease --dependants .\Project.csproj

Update a project with a prerelease version to its next release version. Update all its dependent projects to the next patch release. Projects with release versions will be increased by 1, projects with prerelease versions will be increased to the next patch release version

PS> dotnet update-project --update minor --dependants .\Project.csproj

Update multiple projects to its next release version. Update all their dependant projects to the next patch release.

PS> dotnet update-project --update major --dependants .\Project.csproj .\Project.Abstractions.csproj

dotnet-project-version-updater's People

Contributors

skaempfer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.