Skip to main content

Bumps package version numbers

Project description


Bumps package versions.


By default, running bump in a directory with a will bump the “patch” number in place:

$ bump
$ git diff
@ @ from setuptools import setup

-    version='1.0.0',
+    version='1.0.1',
    description='Bumps package version numbers',

Conveniently bump will also return the new version number, so you can use it after running the command, for example:

$ export VERSION=`bump`
$ echo "The new version is $VERSION"
The new version is 1.0.1


The bump command can also bump the major or minor version numbers, or set the pre-release identifier or local version segment:

$ bump --help
Usage: bump [OPTIONS] [INPUT] [OUTPUT]

  -M, --major     Bump major number. Ex.: 1.2.3 -> 2.2.3
  -m, --minor     Bump minor number. Ex.: 1.2.3 -> 1.3.3
  -p, --patch     Bump patch number. Ex.: 1.2.3 -> 1.2.4
  -r, --reset     Reset subversions. Ex.: Major bump from 1.2.3 will be 2.0.0
                  instead of 2.2.3
  --pre TEXT      Set the pre-release identifier
  --local TEXT    Set the local version segment
  --canonicalize  Canonicalize the new version
  --help          Show this message and exit.

The –reset option should be used alongside with minor or major bump.

You can configure these options by setting them in a .bump or setup.cfg configuration file as well, so you don’t have to specify them every time:

$ cat .bump
input = some_directory/
minor = true
patch = false
reset = true

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bump-1.3.2.tar.gz (3.8 kB view hashes)

Uploaded source

Built Distribution

bump-1.3.2-py3-none-any.whl (4.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page