If you specify a TOML File Replacer, it will parse the TOML file specified and replace the key with the new version. Nested keys are supported using .
.
If you specify the following in your .semver
config file:
file_replacers:
- type: toml
name: Cargo.toml
key: version
format: "v%M.%m.%p"
Given the following contents for Cargo.toml
:
name = "my package"
version = "v0.0.0"
When creating v1.0.0
, the PageKey Semver will replace the Cargo.toml
with the following:
name = "my package"
version = "v1.0.0"
Note that the value will always be replaced with the format
you specified in the config, regardless of the previous value.
If you specify the following in your .semver
config file:
file_replacers:
- type: toml
name: Cargo.toml
key: project.metadata.version
format: "v%M.%m.%p"
Given the following contents for Cargo.toml
:
name = "my package"
[project.metadata]
version = "v0.0.0"
When creating v1.0.0
, the PageKey Semver will replace the package.json
with the following:
name = "my package"
[project.metadata]
version = "v1.0.0"
Note that the value will always be replaced with the format
you specified in the config, regardless of the previous value.