The bumper package

[Tags: bsd3, program]

Automatically bump package versions, also transitively.

Readme: https://www.github.com/silkapp/bumper/blob/master/README.md


[Skip to ReadMe]

Properties

Versions0.5, 0.5.0.1, 0.5.0.2, 0.5.0.3, 0.5.1, 0.5.1.1, 0.5.1.2, 0.6, 0.6.0.1, 0.6.0.2, 0.6.0.3
Change logCHANGELOG.md
Dependenciesbase (==4.*), Cabal (>=1.6 && <1.19), containers (>=0.4 && <0.6), fclabels (>=1.0 && <2.1), process (>=1.0 && <1.3), regex-compat (>=0.93 && <0.96), split (>=0.1 && <0.3), strict (==0.3.2) [details]
LicenseBSD3
Copyright(c) 2012, Silk
AuthorSilk
Maintainercode@silk.co
CategoryDevelopment
Home pagehttp://github.com/silkapp/bumper
Source repositoryhead: git clone git://github.com/silkapp/bumper.git
Executablesbumper
UploadedWed Feb 26 13:44:35 UTC 2014 by AdamBergmark
DistributionsLTSHaskell:0.6.0.3, NixOS:0.6.0.3, Stackage:0.6.0.3
Downloads1765 total (74 in last 30 days)
Votes
0 []
StatusDocs not available [build log]
Last success reported on 2015-05-24 [all 2 reports]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for bumper-0.6.0.1

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.

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