f14shm4n / f14.AutoVersion

.Net Core CLI Tool for auto update build version for your project.json.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

f14.AutoVersion

Version 1.0.1

This is small .Net Core CLI tool for auto-update build version of your project.

##CLI Command name: dotnet autover.

Params:

  • -backup or short name -b: set this if you need to create backup of current project.json. File created each tool run.
  • -template or short name -t and MUST BE SET AFTER PARAM value 1.0.0-alpha-{00000}. The variable part is enclosed in a brace.
    • Template: 1.0.0-alpha-{00000}. Result: n1(1.0.0-alpha-00001), n2(1.0.0-alpha-00002),n3(1.0.0-alpha-00003),n100(1.0.0-alpha-00100)
    • Template: 1.0.0-beta{0}. Result: n1(1.0.0-beta1), n2(1.0.0-beta2),n3(1.0.0-beta3),n100(1.0.0-beta100)

NuGet

NuGet

How To Use

project.json

Add to the tools section:

"tools": {
    "f14.AutoVersion": "1.0.0"
  }

If your project is not netcoreapp targeted, add imports.

Sample for netstandard1.6:

"dependencies": {
    "NETStandard.Library": "1.6.0"
  },
  "tools": {
    "f14.AutoVersion": "1.0.0"      <-- Add tool
  },
  "frameworks": {
    "netstandard1.6": {
      "imports": [
        "dnxcore50",
        "netcoreapp1.0"             <-- Add netcoreapp1.0 to import of project frameworks
      ]
    }
  }

Scripts

To change version each time when you compile project add next (setup you format first ;)):

  "scripts": {
    "precompile": "dotnet autover -b -t 1.0.0-alpha-{00000}"
  }

Behavior

Current version in project.json = 1.0.0-aplha-00001 Expected result: 1.0.0-aplha-00002

Current version in project.json = 1.0.0-aplha-01356 Expected result: 1.0.0-aplha-01357

About

Owner and dev:

About

.Net Core CLI Tool for auto update build version for your project.json.


Languages

Language:C# 98.6%Language:PowerShell 1.4%