Giter Site home page Giter Site logo

bump's Introduction

Build Status Gem Version

Introduction

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

Installation

gem install bump

Usage

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

Options

--no-commit

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

bump patch --no-commit

--tag

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

bump patch --tag

--no-bundle

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

bump patch --no-bundle

--replace-in

If you want to bump the version in additional files

bump patch --reaplace-in Readme.md

--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]

or

bump patch -m [no-cli]

Rake

# 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 = ["Readme.md"]
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`

Ruby

require "bump"
Bump::Bump.current        # -> "1.2.3"
Bump::Bump.file           # -> "lib/foo/version.rb"
Bump::Bump.run("patch")   # -> version changed
Bump::Bump.run("patch", commit: false, bundle:false, tag:false) # -> version changed with options
Bump::Bump.run("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:Specification.new "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

Author

Gregory
License: MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.