bumper: Automatically bump package versions, also transitively.

[ bsd3, development, program ] [ Propose Tags ]

Automatically bump package versions, also transitively.

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


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.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 log CHANGELOG.md
Dependencies base (>=4 && <5), Cabal (>=1.6 && <1.26), containers (>=0.4 && <0.6), fclabels (>=1.0 && <2.1), process (>=1.0 && <1.5), regex-compat (>=0.93 && <0.96), split (>=0.1 && <0.3), strict (==0.3.2) [details]
License BSD-3-Clause
Copyright (c) 2012, Silk
Author Silk
Maintainer code@silk.co
Revised Revision 3 made by ErikHesselink at 2016-05-24T10:15:32Z
Category Development
Home page http://github.com/silkapp/bumper
Source repo head: git clone https://github.com/silkapp/bumper.git
Uploaded by ErikHesselink at 2015-01-06T20:34:57Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables bumper
Downloads 10394 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2016-10-27 [all 10 reports]

Readme for bumper-0.6.0.3

[back to package description]

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

  • Bumper does not reformat your cabal file, it only replaces the version ranges without using Cabal's pretty printer (which ignores existing formatting)

  • Transitive bumps are always position 3 (D) bumps. Note that your transitive packages may re-export modules or instances from their dependencies, so they may need to bumped further

  • There is no support for bumping external packages. If you depend on something you are not maintaining you need to bump that version manually

  • Bumper respects version ranges you have specified, if b depends on a >= 0.1 && < 0.3 and you bump a to 0.2.3 the bound will not change, but if you bump a to 0.3 b's dependency will change to a == 0.3.*

  • If you depend on a specific version range (minor, major, ...) the level of the range may change after bumping. Depending on a == 0.1.2.* and doing a major bump of a will change your dependency to a == 0.2.*, but...

  • If you have an explicit version dependency (a == 0.1.0.1) then a major bump of a will result in a == 0.2.

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:

  • b depends on a == 0.1 (fixed version)
  • c depends on a == 0.1.* and b == 0.1.* (major dependencies)
  • d depends on a (any version) and b >= 0.1 && < 0.2 (major dependency)

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