bump
Version changing methods.
Classes¶
Functions:¶
commit_and_tag
¶
commit_and_tag(config: Config, config_file: Optional[Path], configured_files: List[ConfiguredFile], ctx: MutableMapping, dry_run: bool = False) -> None
Commit and tag the changes if a tool is configured.
| PARAMETER | DESCRIPTION |
|---|---|
config
|
The configuration
TYPE:
|
config_file
|
The configuration file to include in the commit if it exists |
configured_files
|
A list of files to commit
TYPE:
|
ctx
|
The context used to render the tag and tag message
TYPE:
|
dry_run
|
True if the operation should be a dry run
TYPE:
|
do_bump
¶
do_bump(version_part: Optional[str], new_version: Optional[str], config: Config, config_file: Optional[Path] = None, dry_run: bool = False) -> None
Bump the version_part to the next value or set the version to new_version.
| PARAMETER | DESCRIPTION |
|---|---|
version_part
|
The name of the version component to bump |
new_version
|
The explicit version to set |
config
|
The configuration to use
TYPE:
|
config_file
|
The configuration file to update |
dry_run
|
True if the operation should be a dry run
TYPE:
|
get_next_version
¶
get_next_version(current_version: Version, config: Config, version_part: Optional[str], new_version: Optional[str]) -> Version
Bump the version_part to the next value.
| PARAMETER | DESCRIPTION |
|---|---|
current_version
|
The current version
TYPE:
|
config
|
The current configuration
TYPE:
|
version_part
|
Optional part of the version to bump |
new_version
|
Optional specific version to bump to |
| RETURNS | DESCRIPTION |
|---|---|
Version
|
The new version |
| RAISES | DESCRIPTION |
|---|---|
ConfigurationError
|
If it can’t generate the next version. |