🐛 fix(release): use double quotes for tag variable expansion#477
Merged
gaborbernat merged 1 commit intotox-dev:mainfrom Apr 8, 2026
Merged
🐛 fix(release): use double quotes for tag variable expansion#477gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat merged 1 commit intotox-dev:mainfrom
Conversation
5de0516 to
03e961b
Compare
Single quotes prevent bash variable expansion, so the temporary tag
was created as the literal string '${STEPS_V_OUTPUTS_VERSION}' instead
of the actual version. hatch-vcs then falls back to git describe,
producing a dev+local version that PyPI rejects.
03e961b to
66863a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release workflow's "Create temporary tag for hatch-vcs" step uses single quotes around
${STEPS_V_OUTPUTS_VERSION}, which prevents bash from expanding the variable. The tag is created as the literal string${STEPS_V_OUTPUTS_VERSION}instead of e.g.4.9.5. Becausehatch-vcsnever finds a valid version tag on the commit, it falls back togit describeand produces a version like4.9.5.dev13+g104d28b48. PyPI then rejects the upload with400 Bad Requestsince local version identifiers aren't allowed.Switching to double quotes fixes the expansion so the temporary tag matches the computed version and
hatch-vcsproduces a clean release version.