Readme for bumper-0.6.0.3

Bumper

Build Status

Bumper is a tool for working with cabal packages. It lets you manage the version bounds of packages by transitively bumping packages (and their dependencies transitively), without you needing to edit the cabal files manually.

It's useful if you have a set of packages that you develop together.

You can install the latest version from Hackage

$ cabal install bumper

or try the git version if you are feeling adventurous.

To get started you should have all projects under a common directory, such as

project/package-1
project/package-2

You can now make changes to these packages and use bumper to handle version bumps. See Examples below.

Interface

$ bumper --help
Usage: bumper [OPTIONS...], with the following options:
  -m PACKAGE(,PACKAGE)*  --major=PACKAGE(,PACKAGE)*                         Comma-separated list of packages which will get a major bump (bump at position 1).
  -n PACKAGE(,PACKAGE)*  --minor=PACKAGE(,PACKAGE)*                         Comma-separated list of packages which will get a minor bump (bump at position 2).
  -0 PACKAGE(,PACKAGE)*  --bump-0=PACKAGE(,PACKAGE)*                        Comma-separated list of packages which will get a bump at position 0.
  -1 PACKAGE(,PACKAGE)*  --bump-1=PACKAGE(,PACKAGE)*                        Comma-separated list of packages which will get a bump at position 1.
  -2 PACKAGE(,PACKAGE)*  --bump-2=PACKAGE(,PACKAGE)*                        Comma-separated list of packages which will get a bump at position 2.
  -3 PACKAGE(,PACKAGE)*  --bump-3=PACKAGE(,PACKAGE)*                        Comma-separated list of packages which will get a bump at position 3.
                         --set-versions=PACKAGE@VERSION(,PACKAGE@VERSION)*  Comma-separated list of packages and their versions.
  -t                     --no-transitive                                    Do not apply bumping transitively.
  -i PACKAGE(,PACKAGE)*  --ignore=PACKAGE(,PACKAGE)*                        Comma-separated list of packages which will be ignored when transitive bumping.
  -g PATH                --global=PATH                                      Bump according to latest version number in the given package database.
  -d                     --dry-run                                          Just output the dependencies that will be updated.
  -?                     --help                                             Show usage help and exit.
  -v                     --version                                          Show version info and exit.

Behavior

Examples

You can find this repository with empty cabal projects at http://github.com/silkapp/bumper-example

$ git clone http://www.github.com/silkapp/bumper-example.git

It contains four empty cabal projects, all with version 0.1:

Say we make a minor change to a and we've checked that all packages build together, so we run

$ bumper --minor a # or bumper -2 a
$ git diff

a/a.cabal
-version:             0.1
+version:             0.1.1

b/b.cabal
-version:             0.1
+version:             0.1.0.1
-                     , a == 0.1
+                     , a == 0.1.1

b's version and its dependency on a was bumped as well. c and d are still compatible with a so they were not modified.

It works in the same fashion no matter what degree of bumping you do.

$ git reset --hard
$ bumper --major a
$ git diff

a/a.cabal
-version:             0.1
+version:             0.2

b/b.cabal
-version:             0.1
+version:             0.1.0.1
-                     , a == 0.1
+                     , a == 0.2

c/c.cabal
-version:             0.1
+version:             0.1.0.1
-                     , a == 0.1.*
+                     , a == 0.2.*

Bumper combines all changes you do so versions aren't bumped several times, below b gets one major bump instead of a major and a minor.

$ git reset --hard
$ bumper --major a,b
$ git diff

a/a.cabal
-version:             0.1
+version:             0.2

b/b.cabal
-version:             0.1
+version:             0.2

c/c.cabal
-version:             0.1
+version:             0.1.0.1
-                     , a == 0.1.*
+                     , a == 0.2.*
-                     , b == 0.1.*
+                     , b == 0.2.*

d/d.cabal
-version:             0.1
+version:             0.1.0.1
-                     , b >= 0.1 && < 0.2
+                     , b == 0.2