All Projects → TAGC → dotnet-setversion

TAGC / dotnet-setversion

Licence: MIT license
.NET Core CLI tool to update the version information in .NET Core *.csproj files

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to dotnet-setversion

Gitversion
From git log to SemVer in no time
Stars: ✭ 2,131 (+3393.44%)
Mutual labels:  versioning
Sbt Dynver
An sbt plugin to dynamically set your version from git
Stars: ✭ 243 (+298.36%)
Mutual labels:  versioning
version-sync
Keep version numbers in sync with Cargo.toml
Stars: ✭ 65 (+6.56%)
Mutual labels:  versioning
Aspnet Api Versioning
Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
Stars: ✭ 2,154 (+3431.15%)
Mutual labels:  versioning
Gradle Android Git Version
A gradle plugin to calculate Android-friendly version names and codes from git tags
Stars: ✭ 227 (+272.13%)
Mutual labels:  versioning
PocoDynamo
C# .NET Typed POCO Client for AWS Dynamo DB
Stars: ✭ 39 (-36.07%)
Mutual labels:  net-core
Backport
A simple CLI tool that automates the process of backporting commits on a GitHub repo
Stars: ✭ 154 (+152.46%)
Mutual labels:  versioning
QuitStore
🖧 Quads in Git - Distributed Version Control for RDF Knowledge Bases
Stars: ✭ 87 (+42.62%)
Mutual labels:  versioning
Git Novice
Version Control with Git
Stars: ✭ 227 (+272.13%)
Mutual labels:  versioning
speckle-blender
speckle.systems/tag/blender/
Stars: ✭ 38 (-37.7%)
Mutual labels:  versioning
Maven Git Versioning Extension
This extension will virtually set project versions, based on current git branch or tag.
Stars: ✭ 178 (+191.8%)
Mutual labels:  versioning
Hatch
A modern project, package, and virtual env manager for Python
Stars: ✭ 2,268 (+3618.03%)
Mutual labels:  versioning
minver
What are the minimum dependencies for your package?
Stars: ✭ 18 (-70.49%)
Mutual labels:  versioning
Version
Represent and compare versions via semantic versioning (SemVer) in Swift
Stars: ✭ 160 (+162.3%)
Mutual labels:  versioning
clearml-server-helm
ClearML Server for Kubernetes Clusters Using Helm
Stars: ✭ 18 (-70.49%)
Mutual labels:  versioning
Versioning
Gradle plug-in to generate version information from the SCM branch (Git or Svn)
Stars: ✭ 157 (+157.38%)
Mutual labels:  versioning
Nvm Windows
A node.js version management utility for Windows. Ironically written in Go.
Stars: ✭ 18,587 (+30370.49%)
Mutual labels:  versioning
Versionberg
Gradle plugin for versioning your library/application on every git commit
Stars: ✭ 78 (+27.87%)
Mutual labels:  versioning
active snapshot
Simplified snapshots and restoration for ActiveRecord models and associations with a transparent white-box implementation
Stars: ✭ 67 (+9.84%)
Mutual labels:  versioning
git-version-bumper
Bump your git tag to the next version, easily. 👊
Stars: ✭ 92 (+50.82%)
Mutual labels:  versioning

dotnet-setversion is a simple .NET Core CLI tool used to update the version information within .NET Core *.csproj files.

It is based on dotnet-gitversion, but is updated to work for the new *.csproj format instead of project.json, and relies on the version information being passed to it.

NuGet Build status

Usage

Install dotnet-setversion as a global tool using the dotnet CLI:

$ dotnet tool install -g dotnet-setversion

If the command completed successfully, you're able to invoke dotnet-setversion in any directory like this:

$ setversion 0.1.2-beta0001

You can also update the version information of a specific project file by invoking like this:

$ setversion 0.1.2-beta0001 MyProject.csproj

Recursive updates

If you happen to have a rather big repo including several project files and you want to update them all at once, you can use the --recursive option.
This will update any project file in and below the current working directory.

$ setversion -r 0.1.2-beta0001

Extracting the version from a file

As well as passing the version directly, you can specify a file to extract the version number from. This is done by prefixing the version argument with an @ symbol. For example, the following command will make the tool try to extract the version from a file in the working directory called "sem.ver".

$ setversion @sem.ver

The file should represent the version either as a simple string (i.e. in the same format you'd ordinarily provide directly to the tool, such as 0.1.2) or in JSON format using a schema like this:

{
  "Version": {
    "Major": 0,
    "Minor": 1,
    "Patch": 2
  }
}

Bear in mind that the JSON format does not support metadata extensions (e.g. -beta0001).

Further notes

For each example, replace '0.1.2-beta0001' with any valid version string or, when having GitVersion installed, with $(GitVersion -ShowVariable NuGetVersionV2) to use your current version automatically.

This (or something similar) can of course be done during a continuous integration build, which is the main intention behind developing this project. This tool depends on itself for its own version management during CI builds, so you can use it as a reference.

Migrating from 1.* to 2.*

dotnet-setversion used to be a per-project tool, but has now been reworked as a .NET Core Global Tool.
As a consequence of this, you have to remove the <DotNetCliToolReference> element referencing dotnet-setversion or you'll get an error when running dotnet restore.

Depending on your build strategy, you have to install setversion once on your build agent (see Usage) or integrate the install command into your build script.

Finally you have to change the way to invoke the program from dotnet setversion to setversion.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].