Skip to content

Commit 070c287

Browse files
committed
add init script validation to workflow
1 parent cfadddf commit 070c287

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/openwrt-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ jobs:
6666
--exclude='.github' \
6767
./ feed/${PKG_NAME}/
6868
69+
- name: ✅ Validate shell script syntax
70+
run: |
71+
echo "🔍 Checking shell script syntax..."
72+
find feed/${PKG_NAME}/files/etc/init.d/ -type f -name '*' 2>/dev/null | while read -r script; do
73+
if [ -f "$script" ]; then
74+
echo "Checking syntax of: $script"
75+
bash -n "$script" || { echo "❌ Syntax error in $script"; exit 1; }
76+
echo "✅ $script syntax OK"
77+
fi
78+
done
79+
echo "✅ All shell scripts passed syntax validation"
80+
6981
- name: 🧮 Compute ARCH
7082
run: |
7183
if [ "${{ matrix.version }}" = "snapshots" ]; then

0 commit comments

Comments
 (0)