bducharme / incr

Tasteful utility to increment the version number and create a corresponding git tag.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

incr
Incr is a tool to help you easily increment the version number of your NPM or Mix packages.

What does incr do?

The process is detailed as follow:

  • Find the relevant file(s) (e.g.: package.json and package-lock.json or mix.exs).
  • Determine the existing version number.
  • Increment the specified segment. If you increment the minor segment, the patch segment is set to 0 and the same goes for the major segment, the minor and patch segments are set to 0.
  • Write the newly incremented version number in the relevant file(s).
  • Create a new git commit with the relevant file with the version number as the default message (e.g.: 0.2.1).
  • Create a new git tag pointing to the new git commit with the version number prefixed by a 'v' as the name (e.g.: v0.2.1).
  • 💥

Installation

Prerequisites

incr depends on the Rugged Ruby bindings for libgit2. You need to have CMake and pkg-config installed on your system to be able to build the included version of libgit2. On mac OS, after installing Homebrew, you can get CMake with:

~> brew install cmake

incr

~> gem install incr

Usage

To increment the patch segment of your NPM package version number:

~> incr npm patch

To increment the minor segment of your Mix package version number:

~> incr mix minor

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jcouture/incr. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

The incr shield logo is based on this icon by blackspike, from the Noun Project. Used under a Creative Commons BY 3.0 license.

About

Tasteful utility to increment the version number and create a corresponding git tag.

License:MIT License


Languages

Language:Ruby 100.0%