UNPKG

travis-pre-release

Version:

Append pre-release build number to version in package.json

48 lines (30 loc) 1.12 kB
# release-version > Release and build number appender to package.json version If you use Artifactory on premise to publish node projects, you need to update the version each time you publish new builds. This package allow Jenkins or other build system to update the version in your project with the current build number given by jenkins optionally with a pre-release version. Reference: [semver.org spec](http://semver.org/#spec-item-9) ## Getting Started This package is for node.js projects that contain package.json files. ```shell npm install -g travis-pre-release ``` ### Usage Examples Once the package has been globally installed it may be used from from any path ```shell release-version -r 2 ``` given current version 1.0.0 will create version: 1.0.0-rc.2 ```shell release-version -b build.420 -p /path/to/project ``` version 1.0.0 will result in: 1.0.0+build.420 on the package.json located in `/path/to/project` ```shell release-version -r alpha -b 2 --pre '' ``` version 1.0.0 will result in: 1.0.0-alpha+2 ```shell release-version -r beta --pre '' ``` version 1.0.0 will result in: 1.0.0-beta