Skip to content

JasonSweatt/teamcity-build-number-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teamcity-build-number-cli Build Status npm npm

Outputs version from package.json in TeamCity service message format.

Install

$ npm install -g teamcity-build-number-cli

Usage

First, make sure your TeamCity "build configuration -> general settings -> Build number format" is set to %build.counter%. This will give your build the number of the auto-incrementing build counter-value when you start building.

When the cli eventually outputs ##teamcity[buildNumber '1.2.3.{build.number}'] (if your package.json has version 1.2.3), TeamCity will read that and replace {build.number} with the value of "Build number format", which is %build.counter%. It will then rename the build in progress.

The resulting name of the build will be #major.minor.patch.buildIterator, where major, minor, patch comes from package.json, and buildIterator comes from TeamCity.

To call the cli, use one of these in your build process:

// if package.json is in current directory:
teamcity-build-number

// or

teamcity-build-number path/to/directory/containg/packagejson

// or

teamcity-build-number path/to/package.json

License

MIT

About

Outputs version from package.json in TeamCity service message format

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 76.2%
  • Gherkin 23.8%