README
dotnet-bump
CLI to increment and tag assembly version(s) in a .NET project. Supports SDK-style and non-SDK projects.
Table of Contents
Example
> dotnet-bump minor --dry-run
- Would stage Foo\Foo.csproj
- Would stage Bar\Properties\AssemblyInfo.cs
- Would commit and tag v1.1.0
> dotnet-bump minor
- Stage Foo\Foo.csproj
- Stage Bar\Properties\AssemblyInfo.cs
- Commit and tag v1.1.0
Usage
dotnet-bump <target> [options] [file..]
Bump to target version, one of:
- A release type:
major,minor,patch,premajor,preminor,prepatch,prerelease- The
majortype bumps the major version (for example2.4.1 => 3.0.0);minorandpatchwork the same way. - The
premajortype bumps the version up to the next major version and down to a prerelease of that major version;preminorandprepatchwork the same way. - The
prereleasetype works the same asprepatchif the input version is a non-prerelease. If the input is already a prerelease then it's simply incremented (for example4.0.0-rc.2 => 4.0.0-rc.3).
- The
- A specific version like 2.4.0 (must be semver).
Files can be glob patterns or paths to a:
- Visual Studio Solution (
*.sln) (parsed to find projects) - Project (
*.csprojor*.fsproj) (parsed to find aVersionelement orAssemblyInfofile) - A
.nuspecfile (containing aversionelement) - C# or F# source code file
- JSON or JSON5 file;
- Directory containing any of the above.
Default is the current working directory. Files must reside in a git working tree (or multiple working trees).
Options
--dry-run -d Print changes but don't make them
--force -f Continue if git working tree(s) are dirty
--no-commit Don't commit and tag
--no-glob Disable globbing
--verbose Verbose output
--version -v Print version and exit
--help -h Print usage and exit
Install
Download a portable binary or install with npm:
npm install dotnet-bump --save-dev
License
MIT © Vincent Weevers