{"id":3917,"library":"bumpversion","title":"bumpversion","description":"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.","status":"maintenance","version":"0.6.0","language":"en","source_language":"en","source_url":"https://github.com/peritus/bumpversion","tags":["versioning","cli","release management","git"],"install":[{"cmd":"pip install bumpversion","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[],"quickstart":{"code":"# 1. Create a project directory and navigate into it\nmkdir my_project && cd my_project\n\n# 2. Initialize a Git repository (optional, but recommended for bumpversion)\ngit init\n\n# 3. Create an initial version file (e.g., 'VERSION' or 'my_package/__init__.py')\necho \"0.1.0\" > VERSION\n\n# 4. Create a .bumpversion.cfg file\ncat <<EOF > .bumpversion.cfg\n[bumpversion]\ncurrent_version = 0.1.0\ncommit = True\ntag = True\n\n[bumpversion:file:VERSION]\nEOF\n\n# 5. Make an initial commit\ngit add .bumpversion.cfg VERSION\ngit commit -m \"Initial project setup\"\n\n# 6. Bump the patch version\nbumpversion patch\n\n# Verify the change\ncat VERSION\ngit log --oneline -2","lang":"bash","description":"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."},"warnings":[{"fix":"Update your CLI commands to use the version part as a positional argument: `bumpversion <part>` (e.g., `bumpversion patch`).","message":"Version 0.5.0 introduced significant breaking changes. The `--bump` argument was removed, making the version part (e.g., `major`, `minor`, `patch`) a required positional argument. For example, `bumpversion --bump minor` became `bumpversion minor`.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Migrate your configuration from `files = file1 file2` to individual sections like `[bumpversion:file:file1]` and `[bumpversion:file:file2]`.","message":"Version 0.5.0 deprecated the `files = ` configuration option in `.bumpversion.cfg`. It was replaced by a new, more granular file-specific configuration using `[bumpversion:file:...]` sections.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"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.","message":"By default, `bumpversion` will abort if your Git working directory is 'dirty' (contains uncommitted changes) to prevent accidental releases or loss of unsaved work. This can be a common point of friction during development.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"Without explicit `search` and `replace` patterns in your configuration, `bumpversion` uses regex-based matching that might inadvertently update unintended strings that happen to match the version pattern (e.g., a version dependency in `pyproject.toml`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"The `current_version` must either be explicitly defined in your `.bumpversion.cfg` or easily detectable from a file. If `bumpversion` cannot determine the current version, it will fail and may require the `--current-version` CLI argument.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider installing and migrating to `bump2version` (`pip install bump2version`) or `bump-my-version` (`pip install bump-my-version`) for better long-term support.","message":"The original `bumpversion` project is no longer actively maintained and explicitly recommends using actively maintained forks like `bump2version` or `bump-my-version` for new projects and ongoing development, as these forks offer continued support, new features (like `pyproject.toml` support), and bug fixes.","severity":"deprecated","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}