Skip to content

Commit 4180bde

Browse files
committed
Fix file iteration
1 parent f572eaa commit 4180bde

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Diff for: .github/other/check-example.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ -z "$example" ]; then
2121
fi
2222

2323
PRE="# EXAMPLE $example |"
24-
dir="examples/$example/godot"
24+
dir="./$example/godot"
2525
logfile="stderr-$example.log"
2626
# stdout also outputs some "ERROR:" messages, these are currently ignored.
2727

Diff for: .github/workflows/ci.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,16 @@ jobs:
215215

216216
- name: "Run examples for short time"
217217
run: |
218-
# List all folders in './example' directory
219-
for example in $(ls examples); do
220-
./.github/other/check-example.sh "$example"
221-
done
218+
# Enable extended globbing to allow pattern exclusion.
219+
shopt -s extglob
220+
221+
# Match all directories/files except `target` and any starting with `.`.
222+
files='!(target|.*)/'
223+
224+
# List all folders in current directory. Don't quote $files variable.
225+
for demo in $files; do
226+
./.github/other/check-example.sh "$demo"
227+
done
222228
223229
224230
cargo-deny-machete:

0 commit comments

Comments
 (0)