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
  -m, --minor     Bump minor number
  -p, --patch     Bump patch number
  --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.

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

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.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

bump-1.2.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bump-1.2.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for bump-1.2.0.tar.gz
Algorithm Hash digest
SHA256 6d1315178263e9905c26ebb2ada7c371454553c2c1896d4c1591bf6c7f750d96
MD5 732bb2e79df7f75bad8888caf2cd5492
BLAKE2b-256 a01676b8338060b21f6da2f3d3e75467336831b2e1cbab2eb13d4186b1924de4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bump-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for bump-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6826d9650ad63166c670571bff1498cce6e2ebe8d2bde81c6efa5a3d6c6a52be
MD5 fcf52cfe9edf8f42ba490673e1c1eafe
BLAKE2b-256 d8c363968767e9a3b723fc3548d67791705df053be6ec5bf6838cd75fd0167df

See more details on using hashes here.

Supported by

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