We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a1caa4 commit 9678258Copy full SHA for 9678258
epicshop/run-all-seeds.sh
@@ -0,0 +1,15 @@
1
+#!/bin/bash
2
+set -e
3
+
4
+find exercises -path '*/src/db/seed.ts' | while read -r file; do
5
+ if [ -f "$file" ]; then
6
+ echo "🌱 Seeding $file"
7
+ # we want to run the script from the root of the exercise directory
8
+ # so that paths to the database are resolved correctly.
9
+ dir=$(dirname "$file" | xargs dirname | xargs dirname)
10
+ seed_file=${file#"$dir/"}
11
+ (cd "$dir" && npx tsx "$seed_file")
12
+ fi
13
+done
14
15
+echo "✅ All seeds completed."
0 commit comments