CLI Reference
Without --config-file, the configuration file is searched for in the current directory and, inside a git or mercurial repository, each parent directory up to the repository root. See Configuration files.
File paths given on the command line are relative to the current working directory; absolute paths are used as-is. Paths in the configuration file are relative to the configuration file's directory. See How file paths are resolved.
bump-my-version
Version bump your Python project.
Usage
bump-my-version [OPTIONS] COMMAND [ARGS]...Options
| Name | Description |
|---|---|
--version | Show the version and exit. |
--help | Show this message and exit. |
bump-my-version bump
Change the version.
ARGS may contain any of the following:
VERSION_PART is the part of the version to increase, e.g. minor. Valid values include those given in the --serialize / --parse option.
FILES are additional file(s) to modify. If you want to rewrite only files specified on the command line, use with the --no-configured-files option.
Usage
bump-my-version bump [OPTIONS] [ARGS]...Options
| Name | Description |
|---|---|
--config-file | Config file to read most of the variables from. |
-v / --verbose | Print verbose logging to stderr. Can specify several times for more verbosity. |
--allow-dirty / --no-allow-dirty | Don't abort if working directory is dirty, or explicitly abort if dirty. |
--current-version | Version that needs to be updated |
--new-version | New version that should be in the files |
--to | Set the VERSION_PART to this value instead of incrementing it. Use --new-version to replace the whole version. |
--parse | Regex parsing the version string |
--serialize | How to format what is parsed back to a version |
--search | Template for complete string to search |
--replace | Template for complete string to replace |
--regex / --no-regex | Treat the search parameter as a regular expression or explicitly do not treat it as a regular expression. |
--no-configured-files | Only replace the version in files specified on the command line, ignoring the files from the configuration file. |
--ignore-missing-files / --no-ignore-missing-files | Ignore any missing files when searching and replacing in files. |
--ignore-missing-version / --no-ignore-missing-version | Ignore any Version Not Found errors when searching and replacing in files. |
--dry-run / -n | Don't write any files, just pretend. |
--commit / --no-commit | Commit to version control |
--tag / --no-tag | Create a tag in version control |
--push-tag / --no-push-tag | Push the tag to the remote after creation (only works with --tag) |
--sign-tags / --no-sign-tags | Sign tags if created |
--tag-name | Tag name (only works with --tag) |
--tag-message | Tag message |
-m / --message | Commit message |
--commit-args | Extra arguments to commit command |
--help | Show this message and exit. |
Arguments
ARGS
bump-my-version replace
Replace the version in files.
FILES are additional file(s) to modify. If you want to rewrite only files specified on the command line, use with the --no-configured-files option.
Usage
bump-my-version replace [OPTIONS] [FILES]...Options
| Name | Description |
|---|---|
--config-file | Config file to read most of the variables from. |
-v / --verbose | Print verbose logging to stderr. Can specify several times for more verbosity. |
--allow-dirty / --no-allow-dirty | Don't abort if working directory is dirty, or explicitly abort if dirty. |
--current-version | Version that needs to be updated |
--new-version | New version that should be in the files. If not specified, it will be None. |
--parse | Regex parsing the version string |
--serialize | How to format what is parsed back to a version |
--search | Template for complete string to search |
--replace | Template for complete string to replace |
--regex / --no-regex | Treat the search parameter as a regular expression or explicitly do not treat it as a regular expression. |
--no-configured-files | Only replace the version in files specified on the command line, ignoring the files from the configuration file. |
--ignore-missing-version | Ignore any Version Not Found errors when searching and replacing in files. |
--ignore-missing-files | Ignore any missing files when searching and replacing in files. |
--dry-run / -n | Don't write any files, just pretend. |
--help | Show this message and exit. |
Arguments
FILES
bump-my-version sample-config
Print a sample configuration file.
Usage
bump-my-version sample-config [OPTIONS]Options
| Name | Description |
|---|---|
--prompt / --no-prompt | Ask the user questions about the configuration. |
--destination | Where to write the sample configuration. |
--help | Show this message and exit. |
bump-my-version show
Show current configuration information.
ARGS may contain one or more configuration attributes. For example:
bump-my-version show current_versionbump-my-version show files.0.filenamebump-my-version show scm_info.branch_namebump-my-version show current_version scm_info.distance_to_latest_tag
Usage
bump-my-version show [OPTIONS] [ARGS]...Options
| Name | Description |
|---|---|
--config-file | Config file to read most of the variables from. |
-f / --format | Specify the output format. |
-i / --increment | Increment the version component and add new_version to the configuration. |
--current-version | Version that needs to be updated |
--help | Show this message and exit. |
Arguments
ARGS
bump-my-version show-bump
Show the possible versions resulting from the bump subcommand.
Usage
bump-my-version show-bump [OPTIONS] [VERSION]Options
| Name | Description |
|---|---|
--config-file | Config file to read most of the variables from. |
--ascii | Use ASCII characters only. |
-v / --verbose | Print verbose logging to stderr. Can specify several times for more verbosity. |
--help | Show this message and exit. |
Arguments
VERSION