No hassle on bumping
bmp command bumps and updates the version numbers in a repository according to the yaml file
.bmp.yml. This is convenient if you have written many version numbers in your repository. This command helps you consistently update the version information in your repository.
gem install bmp
First you need to put
.bmp.yml file on the top of your repository like the following:
--- version: 0.1.6 commit: Bump to version v%.%.% files: gradle.properties: version=%.%.% README.md: - coveralls-gradle-plugin v%.%.% - org.kt3k.gradle.plugin:coveralls-gradle-plugin:%.%.%
version property is the current version number of the repository.
commit property is the commit comment of bump commits. This field is optional. The default is
Bump to version v%.%.%.
files are the patterns of the files which contain version numbers in them. The key is the filename and value is the pattern containing the version number.
%.%.% in the pettern string expresses the current vesion number.
The expression above means the file
./gradle.properties contains the pattern
version=0.1.6 (for now) and
%.%.% part means the current version number (
0.1.6) and it will be replaced in each version bumping.
You can set arrays of string to the value for a pattern. In that case, every string is considered as a separate pattern and all will be replaced with the next version in each bump
README.md: - coveralls-gradle-plugin v%.%.% - org.kt3k.gradle.plugin:coveralls-gradle-plugin:%.%.%
Show current version info:
This shows errors if exist. You can check the contents of
.bmp.yml with this command.
bump patch (0.0.1) level:
This command updates all the version numbers which are specified in
bump minor (0.1.0) level:
bump major (1.0.0) level:
bmp --preid beta.1 # This performs 1.2.3 => 1.2.3-beta.1
preid (which means you
Commit (and tag)
Commit bump results (and tag it):
bmp -c commits all the changes now the repository has. Be careful.
And this command also tag it as
- 2016-05-15 v1.2.0 Add commit property in
install dev version
Domain models are in
VersionNumber model represents the version number and bumps itself with levels.
FileUpdateRule model represents unit rule of version number replacement. A rule has a version number, a file path and a pattern for replacement.
BumpInfo model represents overall bumping strategy in a project. This model loosely corresponds to the contents of