Build Status Gem Version


Bump is a gem that will simplify the way you build gems and chef-cookbooks.


gem install bump


Current version:

bump current

Current version: 0.1.2

Version file path:

bump file

Version file path: lib/foo/version.rb

Bump (major, minor, patch, pre):

bump patch

Bump version 0.1.2 to 0.1.3



If you don't want to make a commit after bumping, add the --no-commit option.

bump patch --no-commit


Will add a git tag (if the current project is a git repository and --no-commit has not been given).

bump patch --tag


If you don't want to run the bundle command after bumping, add the --no-bundle option.

bump patch --no-bundle


If you want to bump the version in additional files

bump patch --reaplace-in

--commit-message [MSG], -m [MSG]

If you want to append additional information to the commit message, pass it in using the --commit-message [MSG] or -m [MSG] option.

bump patch --commit-message [no-ci]


bump patch -m [no-cli]


# Rakefile
require "bump/tasks"

# if you want to always tag the version, add:
# Bump.tag_by_default = true
# if you want to bump the version in additional files, add:
# Bump.replace_in_default = [""]

rake bump:current                           # display current version
rake bump:file                              # display version file path

# bumping using defaults for `COMMIT`, `TAG`, and `BUNDLE`
rake bump:major
rake bump:patch
rake bump:minor
rake bump:pre

# bumping with option(s)
rake bump:patch TAG=false BUNDLE=false      # commit, but don't tag or run `bundle`
rake bump:patch COMMIT=false TAG=false      # don't commit, don't tag
rake bump:minor BUNDLE=false                # don't run `bundle`


require "bump"
Bump::Bump.current        # -> "1.2.3"
Bump::Bump.file           # -> "lib/foo/version.rb""patch")   # -> version changed"patch", commit: false, bundle:false, tag:false) # -> version changed with options"patch", commit_message: '[no ci]') # -> creates a commit message with 'v1.2.3 [no ci]' instead of default: 'v1.2.3'

Supported locations

  • VERSION file with 1.2.3
  • gemspec with gem.version = "1.2.3" or "gem-name", "1.2.3" do
  • lib/**/version.rb file with VERSION = "1.2.3"
  • metadata.rb with version "1.2.3"
  • VERSION = "1.2.3" in lib/**/*.rb


License: MIT