-
Notifications
You must be signed in to change notification settings - Fork 27
ci: switch dynamic versioning from file-based to git tag-based #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,9 @@ build-backend = "hatchling.build" | |
| source = "uv-dynamic-versioning" | ||
|
|
||
| [tool.uv-dynamic-versioning] | ||
| [tool.uv-dynamic-versioning.from-file] | ||
| source = "src/airbyte_api/_version.py" | ||
| pattern = "__version__: str = \"(?P<version>[^\"]+)\"" | ||
| vcs = "git" | ||
| style = "pep440" | ||
| fallback-version = "0.0.0" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 fallback-version of 0.0.0 could silently produce bad releases The Was this helpful? React with 👍 or 👎 to provide feedback.
Comment on lines
33
to
+36
|
||
|
|
||
| [tool.hatch.build.targets.sdist] | ||
| include = ["src/airbyte_api", "py.typed", "README-PYPI.md"] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 VCS versioning switch breaks pre-release workflow which still sets version via _version.py sed
The versioning source changed from file-based (
from-filereading_version.py) to VCS-based (vcs = "git"), but the pre-release workflow (.github/workflows/pre-release-command.yml:122-127) still usessedto modify_version.pyto set the desired pre-release version. Sinceuv-dynamic-versioningnow derives the package version from git tags instead of_version.py, thesededit has no effect on the built package version.Additionally, the pre-release workflow does a shallow checkout (no
fetch-depth: 0at.github/workflows/pre-release-command.yml:113-116), so VCS versioning will fall back to0.0.0. Even withfetch-depth: 0, the version would be derived from the latest existing tag rather than the user-specified pre-release version, because the pre-release tag is only created after the build/publish steps (.github/workflows/pre-release-command.yml:138-144). The result is that pre-release packages will be published with the wrong version (likely0.0.0).Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.