mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(ci): avoid rg dependency in changelog gate
This commit is contained in:
@@ -40,12 +40,19 @@ prepare_gates() {
|
||||
fi
|
||||
|
||||
local has_changelog_update=false
|
||||
if printf '%s\n' "$changed_files" | rg -q '^CHANGELOG\.md$'; then
|
||||
has_changelog_update=true
|
||||
fi
|
||||
|
||||
local unsupported_changelog_fragments
|
||||
unsupported_changelog_fragments=$(printf '%s\n' "$changed_files" | rg '^changelog/fragments/' || true)
|
||||
local unsupported_changelog_fragments=""
|
||||
local changed_path
|
||||
while IFS= read -r changed_path; do
|
||||
[ -n "$changed_path" ] || continue
|
||||
case "$changed_path" in
|
||||
CHANGELOG.md)
|
||||
has_changelog_update=true
|
||||
;;
|
||||
changelog/fragments/*)
|
||||
unsupported_changelog_fragments="${unsupported_changelog_fragments}${changed_path}"$'\n'
|
||||
;;
|
||||
esac
|
||||
done <<<"$changed_files"
|
||||
if [ -n "$unsupported_changelog_fragments" ]; then
|
||||
echo "Unsupported changelog fragment files detected:"
|
||||
printf '%s\n' "$unsupported_changelog_fragments"
|
||||
|
||||
Reference in New Issue
Block a user