mirror of https://github.com/pypa/hatch.git
26 lines
678 B
Markdown
26 lines
678 B
Markdown
# Regex version source
|
|
|
|
-----
|
|
|
|
See the documentation for [versioning](../../version.md).
|
|
|
|
## Updates
|
|
|
|
Setting the version is supported.
|
|
|
|
## Configuration
|
|
|
|
The version source plugin name is `regex`.
|
|
|
|
```toml config-example
|
|
[tool.hatch.version]
|
|
source = "regex"
|
|
```
|
|
|
|
## Options
|
|
|
|
| Option | Description |
|
|
| --- | --- |
|
|
| `path` (required) | A relative path to a file containing the project's version |
|
|
| `pattern` | A regular expression that has a named group called `version` that represents the version. The default pattern looks for a variable named `__version__` or `VERSION` that is set to a string containing the version, optionally prefixed with the lowercase letter `v`. |
|