Skip to content
This repository has been archived by the owner on Sep 16, 2018. It is now read-only.

PaulTrampert/dotnet-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package is no longer maintained. Project.json is no longer supported by Microsoft, and so this project is no longer useful.

dotnet-version

Tool to update the version of a project.json.

Usage

Include this in the tools section of your project.json. It's available via nuget:

{
  "tools": {
    "dotnet-version": "1.1.0"
  }
}

To change the version listed in the project.json from the command line, make sure your working directory is your project root. Then call dotnet version set --new-version <version_number>. You can also use an environment variable to set the version by calling dotnet version set --env-var <variable_name>. This is particularly useful in the project.json scripts section, where environment variables will not be resolved.

Then from the command prompt, change your working directory to the root of your project. For example if your project.json is in C:\Users\Paul\Project, you would cd C:\Users\Paul\Project. You can then change the version string in the project.json with dotnet version <yourversionnumber>.

The primary purpose of this is build servers. the build script might do something like this:

dotnet version set --new-version 1.3.0
dotnet pack -c Release
git commit -a -m "Release 1.3.0"
git tag 1.3.0
dotnet version set --new-version 1.3.1-*
git commit -a -m "Next working version"

This would set the version to 1.3.0, then build and pack the project.

About

Tool to update the version of a project.json

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages