Skip to content

Commit 629b471

Browse files
committed
fix(ci): prevent changelog generation failure when no chore commits exist
grep -v returns exit code 1 on empty input, which kills the script under bash -e -o pipefail.
1 parent 73084c6 commit 629b471

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
add_section "Documentation" "docs"
104104
105105
# Miscellaneous (chore, excluding release/version bumps)
106-
MISC=$(git log "$RANGE" --pretty=format:"%s" --grep="^chore" | grep -v -E "^chore\((release|version)\)" | grep -v "^chore: version" | sed 's/^chore[:(][^)]*)[: ]*//' | sed 's/^chore: //' | sed 's/^/- /')
106+
MISC=$(git log "$RANGE" --pretty=format:"%s" --grep="^chore" | grep -v -E "^chore\((release|version)\)" | grep -v "^chore: version" | sed 's/^chore[:(][^)]*)[: ]*//' | sed 's/^chore: //' | sed 's/^/- /' || true)
107107
if [ -n "$MISC" ]; then
108108
CHANGELOG="${CHANGELOG}### Miscellaneous\n\n${MISC}\n\n"
109109
fi

0 commit comments

Comments
 (0)