fix(release): create signed annotated tags safely under tag.gpgsign#727
Merged
Conversation
A plain `git tag <name>` aborts with "Please supply the message" when
`tag.gpgsign=true` and no editor is available (CI / non-interactive runs).
Extract tagging into `release::create_tags`, which always creates annotated
`-m` tags (signed when gpgsign is on) and pins the floating major tag to the
release commit via `^{}`. Add regression tests and slim the /release skill to
a thin reminder now that the flow is fully handled in release.sh.
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
release.shcould not tag a release whentag.gpgsign=trueis set in git config (the maintainer's setup). A plaingit tag <name>under that config tries to create a signed tag, needs a message, and aborts withPlease supply the message using either -m or -F optionin any non-interactive/CI run — leaving the release half-done.Changes
release::create_tags, which:-mmessage (git signs it automatically whentag.gpgsign=true, and never opens an editor)v0) with-f, pinned to the release commit via^{}rather than the version tag objecttest_create_tags_*) — CI-safe (no GPG key needed), asserting tags are annotated, the major tag points at the release commit, and the major tag name is returned./releaseskill to a thin reminder now that the whole e2e flow lives inrelease.sh.Test plan
./bashunit tests/unit/release_*.sh— all green (incl. new tests)make sa && make lint— cleanshfmt— cleantag.gpgsign=true