Giter VIP home page Giter VIP logo

dotnetversion's Introduction

DotnetVersion

A simple tool to update the version number of your project. If you know of yarn version, this is that for .NET.

Usage

Basic usage

The simplest way to use the tool is to run the command with no input:

dotnet version

This will ask you to specify the desired version number.

Specifying version change

To prevent the prompt you can use the --new-version option to specify the version number:

dotnet version --new-version 1.2.3

You can let the tool automatically figure out the proper version by specifying which part of the version should be incremented:

# Given version is 1.2.3

# Make the version 1.2.4
dotnet version --patch

# Make the version 1.3.0
dotnet version --minor

# Make the version 2.0.0
dotnet version --major

Custom project file path

By default, the tool will look for a csproj file in the current directory. You can use --project-file to specify a custom path:

# Increment major version number of specified project file
dotnet version --project-file path/to/project/file --major

Git integration

By default the tool will commit immediately after changing the version and tag the commit with the version number. This can be disabled by passing --no-git:

# Increment minor version number, but don't commit it
dotnet version --no-git --minor

The message of the commit will be the version number. Use --message to override the commit message:

# Increment minor version number and commit with custom message
dotnet version --minor --message "Bump the minor version"

Use --no-git-tag to prevent a tag being added to the commit:

# Increment patch version number, but don't add a tag
dotnet version --patch --no-git-tag

To specify a prefix to the version number, use --git-version-prefix. This prefix is added to both the commit message (if it's not overridden) and the tag:

# Increment patch version number and prefix the version with 'v'
dotnet version --patch --git-version-prefix v

Help output:

Update project version

Usage: dotnet-version [options]

Options:
  --new-version         New version
  --major               Auto-increment major version number
  --minor               Auto-increment minor version number
  --patch               Auto-increment patch version number
  -p|--project-file     Path to project file
  --no-git              Do not make any changes in git
  --message             git commit message
  --no-git-tag          Do not generate a git tag
  --git-version-prefix  Prefix before version in git
  -?|-h|--help          Show help information

dotnetversion's People

Contributors

jon-indico avatar jonstodle avatar franzzua 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.