Repository navigation
chore(release): release tags are vX.Y.Z, checked before push - #43
Merged
Merged
Conversation
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.
Summary
Document that releases follow semantic versioning with a
vprefix, and add a repository Git hook that refuses any other tag shape before the push leaves the clone.The hook reads the refs Git passes on stdin and checks every
refs/tags/*entry. Branch pushes pass through. Version matching stays in the release workflow.git config core.hooksPath .githooks # once per cloneEvidence
Hook exercised through a real
git push --dry-runwithcore.hooksPathset:refs/heads/mainrefs/tags/v0.3.3refs/tags/v0.4.0-rc.1refs/tags/v0.4.0+build.7refs/tags/0.3.3refs/tags/v0.3refs/tags/release-v0.3.3refs/tags/v0.3.3.4refs/tags/v01.2.3git push --dry-run origin bad-tag→error: refusing to push tag 'bad-tag': release tags are vX.Y.Z(exit 1).After:
git push --dry-run origin v9.9.9→ passes;git ls-remote --tags origin v9.9.9confirms nothing was published.Merge Danger
Door: two-way — delete the hook file to remove it.
Blast Radius: release process only.
The hook is opt-in per clone, so a clone that never runs
git config core.hooksPath .githooksis unaffected.git push --no-verifybypasses it; the release workflow still refuses a tag that disagrees with theCargo.tomlversion, so a bypass cannot publish a mismatched release.