Skip to content

🐛 fix(release): use double quotes for tag variable expansion#477

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:fix/release-tag-quoting
Apr 8, 2026
Merged

🐛 fix(release): use double quotes for tag variable expansion#477
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:fix/release-tag-quoting

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

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. Because hatch-vcs never finds a valid version tag on the commit, it falls back to git describe and produces a version like 4.9.5.dev13+g104d28b48. PyPI then rejects the upload with 400 Bad Request since local version identifiers aren't allowed.

Switching to double quotes fixes the expansion so the temporary tag matches the computed version and hatch-vcs produces a clean release version.

@gaborbernat gaborbernat added the bug Something isn't working label Apr 6, 2026
@gaborbernat gaborbernat requested a review from ofek as a code owner April 6, 2026 23:48
@gaborbernat gaborbernat force-pushed the fix/release-tag-quoting branch from 5de0516 to 03e961b Compare April 8, 2026 23:51
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.
@gaborbernat gaborbernat force-pushed the fix/release-tag-quoting branch from 03e961b to 66863a1 Compare April 8, 2026 23:51
@gaborbernat gaborbernat merged commit d5d812a into tox-dev:main Apr 8, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant