Skip to main content

Bumps package version numbers

Project description

bump

Bumps package versions.

Example

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

$ bump
1.0.1
$ git diff setup.py
─────────────────────────────────────────────────
modified: setup.py
─────────────────────────────────────────────────
@ setup.py:6 @ from setuptools import setup

setup(
    name='bump',
-    version='1.0.0',
+    version='1.0.1',
    description='Bumps package version numbers',
    long_description=open('README.rst').read(),
    license='MIT',

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

Options

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]

Options:
  -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
[bump]
input = some_directory/__file__.py
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.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

bump-1.3.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file bump-1.3.1.tar.gz.

File metadata

  • Download URL: bump-1.3.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for bump-1.3.1.tar.gz
Algorithm Hash digest
SHA256 62fd81fc8933ee86ab8725a435b4f06e6b508b2522a6d91236165ec52d7dcd33
MD5 e1feae1cb729ae5f8ae682bc3e955d35
BLAKE2b-256 bd953c4156a945b619350d5e2db318422ae4746214ee8b56533ec740991d727c

See more details on using hashes here.

Provenance

File details

Details for the file bump-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: bump-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for bump-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e70aa079da3306982f357cd782fcabd467df5d1c485dd92b0d2f140ddf7f315c
MD5 b403b344f98fa257698d71740f3124cc
BLAKE2b-256 bc5840d1a7ba6c02304d360c181c6f61d3ce1d23684ba5a10620ba1ca4ef01a9

See more details on using hashes here.

Provenance

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