Commands#

bumpversion has one command that changes things and two that only report.

CommandEffect
bumpversion major / minor / patchBump that component
bumpversion bump <component>Bump any component, including one you defined
bumpversion show [<variable>...]Print resolved config and repository state
bumpversion show-bump <component>Print what the next version would be
  • Bumping — the bump commands, --dry-run, and how to read the verbose report.
  • Inspectingshow and show-bump.
  • CLI reference — every flag, the verbosity levels, and the exit codes.

The full help text:

$ bumpversion --help
 
bump git version
 
Usage: bumpversion [OPTIONS] [ARGS]... [COMMAND]
 
Commands:
  major
  minor
  patch
  show
  show-bump
  bump
  help       Print this message or the help of the given subcommand(s)
 
Arguments:
  [ARGS]...
 
Options:
      --dir <DIR>
          repository directory to run bumpversion in [env: BUMPVERSION_DIR=]
      --config-file <CONFIG_FILE>
          config file to read most of the variables from [env: BUMPVERSION_CONFIG_FILE=]
      --color <COLOR_CHOICE>
          enable or disable color [env: BUMPVERSION_COLOR=]
  -v, --verbose...
          Increase logging verbosity
  -q, --quiet...
          Decrease logging verbosity
      --log <LOG_LEVEL>
          Log level. When using a more sophisticated logging setup using RUST_LOG environment variable, this option is overwritten. [env: BUMPVERSION_LOG_LEVEL=]
      --allow-dirty
          don't abort if working directory is dirty [env: BUMPVERSION_ALLOW_DIRTY=]
      --no-allow-dirty
          explicitly abort if dirty [env: BUMPVERSION_NO_ALLOW_DIRTY=]
      --current-version <CURRENT_VERSION>
          version that needs to be updated [env: BUMPVERSION_CURRENT_VERSION=]
      --new-version <NEW_VERSION>
          new version that should be in the files [env: BUMPVERSION_NEW_VERSION=]
      --parse <PARSE_VERSION_PATTERN>
          regex parsing the version string [env: BUMPVERSION_PARSE=]
      --serialize <SERIALIZE_VERSION_PATTERNS>
          how to format what is parsed back to a version [env: BUMPVERSION_SERIALIZE=]
      --search <SEARCH>
          template for complete string to search [env: BUMPVERSION_SEARCH=]
      --replace <REPLACE>
          template for complete string to replace [env: BUMPVERSION_REPLACE=]
      --regex
          treat the search parameter as a regular expression [env: BUMPVERSION_REGEX=]
      --no-regex
          explicitly do not treat the search parameter as a regular expression [env: BUMPVERSION_NO_REGEX=]
      --no-configured-files
          only replace the version in files specified on the command line, ignoring the files from the configuration file [env: BUMPVERSION_NO_CONFIGURED_FILES=]
      --ignore-missing-files
          ignore any missing files when searching and replacing in files [env: BUMPVERSION_IGNORE_MISSING_FILES=]
      --no-ignore-missing-files
          do not allow missing files when searching and replacing in files [env: BUMPVERSION_NO_IGNORE_MISSING_FILES=]
      --ignore-missing-version
          ignore any missing versions when searching and replacing in files [env: BUMPVERSION_IGNORE_MISSING_VERSION=]
      --no-ignore-missing-version
          do not allow missing versions when searching and replacing in files [env: BUMPVERSION_NO_IGNORE_MISSING_VERSION=]
  -n, --dry-run
          don't write any files, just pretend. [env: BUMPVERSION_DRY_RUN=]
      --commit
          commit to version control [env: BUMPVERSION_COMMIT=]
      --no-commit
          do not commit to version control [env: BUMPVERSION_NO_COMMIT=]
      --tag
          create a tag in version control [env: BUMPVERSION_TAG=]
      --no-tag
          do not create a tag in version control [env: BUMPVERSION_NO_TAG=]
      --sign-tags
          sign tags if created [env: BUMPVERSION_SIGN_TAGS=]
      --no-sign-tags
          do not sign tags if created [env: BUMPVERSION_NO_SIGN_TAGS=]
      --tag-name <TAG_NAME>
          tag name (only works with --tag) [env: BUMPVERSION_TAG_NAME=]
      --tag-message <TAG_MESSAGE>
          tag message [env: BUMPVERSION_TAG_MESSAGE=]
  -m, --message <COMMIT_MESSAGE>
          commit message [env: BUMPVERSION_MESSAGE=]
      --commit-args <COMMIT_ARGS>
          extra arguments to commit command [env: BUMPVERSION_COMMIT_ARGS=]
  -h, --help
          Print help
  -V, --version
          Print version

Every flag is global — it is accepted at the top level and on every subcommand, so bumpversion --dry-run patch and bumpversion patch --dry-run are the same command.