fix(ci): avoid rg dependency in changelog gate · openclaw/openclaw@6667b97
steipete
·
2026-06-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -40,12 +40,19 @@ prepare_gates() {
|
40 | 40 | fi |
41 | 41 | |
42 | 42 | local has_changelog_update=false |
43 | | - if printf '%s\n' "$changed_files" | rg -q '^CHANGELOG\.md$'; then |
44 | | - has_changelog_update=true |
45 | | - fi |
46 | | - |
47 | | - local unsupported_changelog_fragments |
48 | | - unsupported_changelog_fragments=$(printf '%s\n' "$changed_files" | rg '^changelog/fragments/' || true) |
| 43 | + local unsupported_changelog_fragments="" |
| 44 | + local changed_path |
| 45 | + while IFS= read -r changed_path; do |
| 46 | + [ -n "$changed_path" ] || continue |
| 47 | + case "$changed_path" in |
| 48 | + CHANGELOG.md) |
| 49 | + has_changelog_update=true |
| 50 | + ;; |
| 51 | + changelog/fragments/*) |
| 52 | + unsupported_changelog_fragments="${unsupported_changelog_fragments}${changed_path}"$'\n' |
| 53 | + ;; |
| 54 | + esac |
| 55 | + done <<<"$changed_files" |
49 | 56 | if [ -n "$unsupported_changelog_fragments" ]; then |
50 | 57 | echo "Unsupported changelog fragment files detected:" |
51 | 58 | printf '%s\n' "$unsupported_changelog_fragments" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。