fix: bumpminor.sh changelog grep drops scoped feat/fix commits
The grep/sed only matched unscoped conventional-commit subjects
("feat: ...", "fix: ..."), so every scoped commit ("feat(server): ...")
was silently dropped from the generated changelog entry. Both 5.4.4 and
5.4.5 needed a manual follow-up fix for this. Broaden the pattern to
accept an optional (scope) and drop it from the changelog line.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uc9V1v7iXruubpoLiSE24M
This commit is contained in:
@@ -9,8 +9,10 @@ sed -i".bak" "s/\*\*Package:\*\* \`hbd\` v[0-9.]*/\*\*Package:\*\* \`hbd\` v$VE
|
|||||||
|
|
||||||
# Update CHANGELOG.md with commits since last tag
|
# Update CHANGELOG.md with commits since last tag
|
||||||
LASTTAG=$(git describe --tags --abbrev=0 2>/dev/null || true)
|
LASTTAG=$(git describe --tags --abbrev=0 2>/dev/null || true)
|
||||||
ADDED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep "^feat:" | sed 's/^feat: /- /')
|
# Matches both unscoped ("feat: ...") and scoped ("feat(server): ...") conventional-commit
|
||||||
FIXED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep "^fix:" | sed 's/^fix: /- /')
|
# subjects; the scope is dropped from the changelog line.
|
||||||
|
ADDED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep -E "^feat(\([^)]*\))?:" | sed -E 's/^feat(\([^)]*\))?: /- /')
|
||||||
|
FIXED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep -E "^fix(\([^)]*\))?:" | sed -E 's/^fix(\([^)]*\))?: /- /')
|
||||||
{
|
{
|
||||||
printf "## [%s]\n" "$VER"
|
printf "## [%s]\n" "$VER"
|
||||||
[ -n "$ADDED" ] && printf "\n### Added\n%s\n" "$ADDED"
|
[ -n "$ADDED" ] && printf "\n### Added\n%s\n" "$ADDED"
|
||||||
|
|||||||
Reference in New Issue
Block a user