Skip to content

Commit c99db7d

Browse files
authored
Fix server-validation ci pending instance command detection (#19558)
https://github.com/twentyhq/twenty/actions/runs/24246052659/job/70792870185
1 parent 5a22cc8 commit c99db7d

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/ci-server.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,18 @@ jobs:
144144
exit 1
145145
- name: Server / Check for Pending Migrations
146146
run: |
147-
CORE_MIGRATION_OUTPUT=$(npx nx database:migrate:generate twenty-server -- --name core-migration-check || true)
147+
npx nx database:migrate:generate twenty-server -- --name pending-migration-check || true
148148
149-
CORE_MIGRATION_FILE=$(ls packages/twenty-server/src/database/typeorm/core/migrations/common/*core-migration-check.ts 2>/dev/null || echo "")
150-
151-
if [ -n "$CORE_MIGRATION_FILE" ]; then
149+
if ! git diff --quiet; then
152150
echo "::error::Unexpected migration files were generated. Please run 'npx nx database:migrate:generate twenty-server -- --name <migration-name>' and commit the result."
153-
echo "$CORE_MIGRATION_OUTPUT"
151+
echo ""
152+
echo "The following migration changes were detected:"
153+
echo "==================================================="
154+
git diff
155+
echo "==================================================="
156+
echo ""
154157
155-
rm -f packages/twenty-server/src/database/typeorm/core/migrations/common/*core-migration-check.ts
158+
git checkout -- .
156159
157160
exit 1
158161
fi

0 commit comments

Comments
 (0)