Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

foss-haas/vworp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synopsis

vworp is a tool for bumping the version number of projects and automagically creating git commits and tags for each version.

Basically, it's a substitute for npm version that supports updating multiple files and can be used in projects that don't have a package.json.

license - MIT Dependencies

NPM status

Codacy rating

CLI

$ vworp --help

Modify a project's version number.
Usage: fworp <options> [ <newversion> | major | minor | patch | prerelease |
  prepatch | preminor | premajor ]

Options:
  --file, -f      Filename. This can be specified multiple times.
                                                       [default: "package.json"]
  --nogit, -n     Don't create a commit and tag in git.                         
  --version       Show the version number of fworp.                      
  --help, -h, -?  Show this help information. 

API

var vworp = require('vworp');
vworp('1.3.0', false, ['package.json', 'bower.json', 'component.json'])
.then(
  version => console.log('New version:', version),
  err => console.error('Error:', err.message)
);

vworp([newversion[, noGit[, filename]]])

Bumps/sets the version number of the file in filename (default: "package.json") to newversion.

If noGit is not set to true, modifying the version number will fail if the current git workspace is not empty and a new commit tagged with the version number (e.g. v1.0.0) will be created on success. If not in a git workspace, the option will have no effect.

If newversion is not set, the version number will not be modified and the promise will resolve to the current version number of the file or "0.0.0" if the file does not contain a version property. Otherwise the promise will resolve to the new version number.

If any errors occur, the promise will be rejected with that error.

License

The MIT/Expat license. For more information, see http://foss-haas.mit-license.org/ or the accompanying LICENSE file.

About

`npm version` for timelords.

Resources

License

Stars

Watchers

Forks

Packages

No packages published