mirror of
https://github.com/block/buzz.git
synced 2026-10-28 21:11:48 +00:00
fix(justfile): suppress grep exit code in release changelog formatter
The `format_log` function parses PR numbers from commit subjects via a `grep -oE` pipeline. Commits without a PR suffix (e.g. "Update README.md") cause `grep` to exit 1, which `set -euo pipefail` promotes to a script failure — even though the empty-match case is already handled.
This commit is contained in:
2
Justfile
2
Justfile
@@ -540,7 +540,7 @@ release *ARGS:
|
||||
local range="$1"
|
||||
git log "$range" --format="%h %H %s" --no-merges | while IFS=' ' read -r short full rest; do
|
||||
local pr subject
|
||||
pr=$(printf '%s' "$rest" | grep -oE '\(#[0-9]+\)$' | grep -oE '[0-9]+')
|
||||
pr=$(printf '%s' "$rest" | grep -oE '\(#[0-9]+\)$' | grep -oE '[0-9]+' || true)
|
||||
if [[ -n "$pr" ]]; then
|
||||
subject=$(printf '%s' "$rest" | sed -E 's/ \(#[0-9]+\)$//')
|
||||
printf -- '- %s ([#%s](https://github.com/%s/pull/%s)) ([`%s`](https://github.com/%s/commit/%s))\n' \
|
||||
|
||||
Reference in New Issue
Block a user