tagbump
Bumps the version of a package, optionally creating the git tag and updating composer.json and/or package.json files.
Installation
npm install -g @johnshopkins/tag-bump
Usage
In the root of a project with a Git repository, run the following command to bump the version:
$ tagbump <major|minor|bugfix>
You will be prompted with a couple questions:
-
Updated composer.json and/or package.json? (y): Responding
y
(default) updates the composer.json and/or package.json files with the new version, but only if theversion
attribute is already present. -
Create the tag now? (y): Responding
y
(default) creates the tag with Git. -
Tag message (Version x.y.z): Optionally customize the tag message. The default is
Version x.y.z
.
-y option
$ tagbump -y <major|minor|bugfix>
Pass the -y
option to automatically use the defaults:
- Updates composer.json and/or package.json
- Creates the tag with the default tag message