-
-
Notifications
You must be signed in to change notification settings - Fork 346
Open
Description
Proposal
Please consider adding a new TOML option to the regex version source named default
.
[tool.hatch.version]
source = “regex”
path = “version.txt”
default = “0.dev”
Semantics: If the default
option is specified and the version file is not found, the default
value will be used as the current version. If default
is not specified, the version source will continue with its previous behaviour.
Validity Rules: The default
value must adhere to the PEP 440 version format.
Intended use case
At our workplace, we use an internal tool to calculate versions. It interacts with Hatch (UV) via regex source via version.txt
. Currently, if version.txt
is missing, uv build
or uv sync
crash. We’d like to build the project or synchronise dependencies locally without using the internal tool. Hence, it would be handy to be able to just set the default
version.
Metadata
Metadata
Assignees
Labels
No labels