Tired of editing tons of pom.xml and package.json every time you need to publish a new version? bump-version-files is the utility you are looking for!
To install in the local node_modules:
npm install --save-dev bump-version-files
or
yarn add bump-version-files --dev
Or you can install it as a global package:
npm install --global bump-version-files
or
yarn global add bump-version-files
Copy versionFiles.example.json
included in this package to versionFiles.json
somewhere in your project, and use it to tell bump-version-files where do you store your version numbers.
You will have to set the path to the file and the property where the version is, for every file.
The best way is to add to your package.json
:
{
"scripts": {
"bump-version": "bump-version-files ./path/to/versionFiles.json"
}
}
so we can do:
node run bump-version patch
or
yarn bump-version patch
bump-version-files ./path/to/versionFiles.json patch
We use SemVer for versioning.
This project is licensed under the MIT License - see the LICENSE.md file for details