I'm using a ci tool that parses commit history, generates the "next" version and updates the version in pyproject.toml (the tool is python-semantic-release).
What I just noticed was, since python-semantic-release updates pyproject.toml when it performs a build, once the build has finished uv.lock contains the "wrong" version for the project, i.e.
[[package]]
name = "my-package"
version = "0.2.1.dev0"
source = { virtual = "." }
Since python-semantic-release bumped the version to "0.2.1". To fix I added uv sync && build.sh && git add uv.lock - this updates the lock file and stages it (with the other files python-semantic-release modifies.
I'm not sure if this causes more problems than it fixes, but I thought I'd mention it - I think in general it's probably a better practice to generate tags based on the pyproject.toml->project.version rather than the other way around?
This is more an observation rather than an issue.
I'm using a ci tool that parses commit history, generates the "next" version and updates the version in pyproject.toml (the tool is
python-semantic-release
).What I just noticed was, since
python-semantic-release
updatespyproject.toml
when it performs a build, once the build has finisheduv.lock
contains the "wrong" version for the project, i.e.Since
python-semantic-release
bumped the version to "0.2.1". To fix I addeduv sync && build.sh && git add uv.lock
- this updates the lock file and stages it (with the other filespython-semantic-release
modifies.I'm not sure if this causes more problems than it fixes, but I thought I'd mention it - I think in general it's probably a better practice to generate tags based on the pyproject.toml->project.version rather than the other way around?