bumpversion is a command-line utility for managing semantic versioning in software projects. It automates the process of updating all version strings across various files in your source code, creating commits, and tagging releases in version control systems like Git or Mercurial. The project itself is in maintenance mode, with its official GitHub repository recommending actively maintained forks like `bump2version` and `bump-my-version` for new users. The current PyPI version is 0.6.0, with an infrequent release cadence.
pip install bumpversionNo compatibility data collected yet for this library.
This quickstart demonstrates how to set up `bumpversion` for a simple project, initialize a version file and a configuration file, and then perform a version bump. It includes Git commands as `bumpversion` integrates closely with Git for committing and tagging. The `current_version` in `.bumpversion.cfg` must match the version string found in your files.
Update your CLI commands to use the version part as a positional argument: `bumpversion <part>` (e.g., `bumpversion patch`).
Migrate your configuration from `files = file1 file2` to individual sections like `[bumpversion:file:file1]` and `[bumpversion:file:file2]`.
Always commit your changes before running `bumpversion`. If you intentionally want to bypass this check, use the `--allow-dirty` command-line option, but exercise caution.
For critical files, always use specific `search = "version = {current_version}"` and `replace = "version = {new_version}"` patterns in your `[bumpversion:file:...]` sections to precisely target the version string.Ensure your `.bumpversion.cfg` (or `setup.cfg`/`pyproject.toml`) has `current_version = X.Y.Z` defined, or that your version files are consistently formatted for automatic detection.
Consider installing and migrating to `bump2version` (`pip install bump2version`) or `bump-my-version` (`pip install bump-my-version`) for better long-term support.
Run the command with a specified version part, for example: `bumpversion patch` or `bumpversion minor`.
Address the underlying Git issue (e.g., configure GPG signing correctly or temporarily disable it, ensure commit message is valid), or use `bumpversion --no-commit` and commit manually.
Ensure the `current_version` in your `.bumpversion.cfg` accurately reflects the current version in your files, and verify that the `search` and `replace` patterns are correctly defined to match your version string format in the target files.
Manually specify the `current_version` in your `.bumpversion.cfg` file or via the `--current-version` command-line argument for the initial bump. After the first successful bump, ensure `bumpversion` creates a tag, which it can then use for subsequent operations.
No dependency data recorded yet.