Skip to main content

Module config

Module config 

Source
Expand description

§Configuration Parsing

Parses .bumpversion.toml configuration strings as used by bumpversion, bump2version, and bump-my-version. Fully no_std + alloc: the filesystem helper parse_config_file requires the std feature.

§Multiline Values

Multi-line values are written with indented continuation lines:

[bumpversion:file:CHANGELOG.md]
search = ## {current_version}
    release notes
    more notes
replace = ## {new_version}

Structs§

BumpConfig
Top-level configuration read from .bumpversion.toml.
FileConfig
Per-file search/replace configuration parsed from a [bumpversion:file:PATH] section.
PartConfig
Per-version-part configuration, parsed from a [bumpversion:part:NAME] section.

Constants§

DEFAULT_MESSAGE
Default commit message template.
DEFAULT_PARSE
Default parse regex used when none is provided in the config.
DEFAULT_SERIALIZE
Default serialise format used when none is provided.

Functions§

parse_config
Parses a .bumpversion.toml configuration string into a BumpConfig.
parse_config_filestd
Reads and parses a .bumpversion.toml file from disk.