Open
Description
Right now, hatch has an environment version source, which can be used to specify an environment variable to take the version from. e.g:
[tool.hatch.version]
source = "env"
variable = "MY_VERSION"
This is ideal for setting the version from an external source (e.g. in CICD), but this also means that if the environment variable is not set, some commands (e.g. pip install -e .
will fail because the version was not set.
It would be great to have an optional default
option to specify the version to use if none is set. e.g.
[tool.hatch.version]
source = "env"
variable = "MY_VERSION"
default = "0+dev"
Metadata
Metadata
Assignees
Labels
No labels