Enhance CI workflow to preview generated types and improve error messaging
This commit is contained in:
@@ -21,8 +21,13 @@ jobs:
|
||||
- name: Verify generated types are checked in
|
||||
run: |
|
||||
supabase gen types typescript --local > supabase/functions/_shared/database.types.ts
|
||||
|
||||
echo "----- Generated types preview -----"
|
||||
head -n 40 supabase/functions/_shared/database.types.ts
|
||||
echo "-----------------------------------"
|
||||
|
||||
if ! git diff --ignore-space-at-eol --exit-code --quiet supabase/functions/_shared/database.types.ts; then
|
||||
echo "Detected uncommitted changes after build. See status below:"
|
||||
git diff
|
||||
exit 1
|
||||
echo "Detected uncommitted changes after build. See diff below:"
|
||||
git diff supabase/functions/_shared/database.types.ts
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user