fix(ci): anchor the release-skip marker to a trailer, and test it
release / tag (push) Successful in 1s
release / tag (push) Successful in 1s
The tagger searched the entire commit message for a bracketed marker as a substring. The commit that introduced the manifest-bump step described that marker in its own body — so the tagger read its own documentation as an instruction and skipped the release. Run 15 reported success with no tag, no manifest bump and no error. Same failure family as everything else in this sweep: the wrong thing happened silently. The rule is now a git trailer matched anchored to its own line, consistent with Bump-Type, and it lives in bin/should-skip-release rather than untested inside YAML. tests/release_skip_test.sh pins six cases, including the exact regression: a message that spells the marker out in prose must still tag. A marker you cannot mention without triggering is a footgun, not a mechanism. Bump-Type: patch Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BeAp5LTscnz2W7Ubt4eJ6m
This commit is contained in:
@@ -30,8 +30,10 @@ jobs:
|
||||
run: |
|
||||
set -euo pipefail
|
||||
last_commit=$(git log -1 --pretty=%B)
|
||||
if printf '%s' "$last_commit" | grep -qi '\[skip-release\]'; then
|
||||
echo "skipping — commit marked [skip-release]"
|
||||
# Delegated to bin/should-skip-release so the rule is covered by
|
||||
# tests/release_skip_test.sh rather than living untested in YAML.
|
||||
if printf '%s\n' "$last_commit" | sh bin/should-skip-release; then
|
||||
echo "skipping — commit carries the Skip-Release trailer"
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
@@ -73,8 +75,8 @@ jobs:
|
||||
if [ "$current" != "$version" ]; then
|
||||
sed -i "s/\"version\"[[:space:]]*:[[:space:]]*\"$current\"/\"version\": \"$version\"/" "$manifest"
|
||||
git add "$manifest"
|
||||
# [skip-release] stops this push from re-triggering the tagger.
|
||||
git commit -m "chore(release): plugin.json version $version [skip-release]"
|
||||
# The trailer below stops this push from re-triggering the tagger.
|
||||
git commit -m "chore(release): plugin.json version $version" -m "Skip-Release: true"
|
||||
git push origin HEAD:main
|
||||
echo "bumped $manifest to $version"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user