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.
Parameters:
config-
The configuration
TYPE:
Config config_file-
The configuration file to include in the commit if it exists
configured_files-
A list of files to commit
TYPE:
List[ConfiguredFile] ctx-
The context used to render the tag and tag message
TYPE:
MutableMapping dry_run-
True if the operation should be a dry run
TYPE:
boolDEFAULT:
False
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.
Parameters:
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.
Parameters:
current_version-
The current version
TYPE:
Version config-
The current configuration
TYPE:
Config version_part-
Optional part of the version to bump
new_version-
Optional specific version to bump to
Returns:
-
Version -
The new version
Raises:
-
ConfigurationError -
If it can’t generate the next version.