Skip to content

Commit f3b6997

Browse files
committed
Implement option to skip certain kernel configs that don't want to play along
1 parent 6076215 commit f3b6997

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/rewrite-kernel-configs.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,22 @@ jobs:
2727
id: gen
2828
shell: bash
2929
run: |
30+
3031
set -euo pipefail
3132
JSON="output/info/image-info.json"
3233
34+
# === Kernel config files to skip (filenames under config/kernel/) ===
35+
# Add more entries as needed.
36+
SKIP_CONFIGS=(
37+
"linux-rockchip-rv1106-vendor.config"
38+
)
39+
40+
# Convert bash array -> JSON array for jq
41+
SKIP_JSON="$(printf '%s\n' "${SKIP_CONFIGS[@]}" | jq -R . | jq -s .)"
42+
3343
tmp="$(mktemp)"
3444
35-
jq -c '
45+
jq -c --argjson skip "$SKIP_JSON" '
3646
def norm_branches:
3747
if . == null then []
3848
elif (type=="string") then ( gsub("[,\\s]+";" ") | split(" ") | map(select(length>0)) )
@@ -61,6 +71,12 @@ jobs:
6171
# 4) If multiple boards share same (family,branch), keep smallest board (lexicographic)
6272
| sort_by(.linuxfamily, .branch, .board)
6373
| group_by([.linuxfamily,.branch]) | map(.[0])
74+
# 5) Filter out rows whose kernel config filename is in skip list
75+
| map(
76+
. as $row
77+
| ( "linux-" + $row.linuxfamily + "-" + $row.branch + ".config" ) as $fname
78+
| select( ($skip | index($fname)) | not )
79+
)
6480
' "$JSON" > "$tmp"
6581
6682
echo "count=$(jq 'length' "$tmp")" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)