From e1b3800be54dd2808803949ced33f67153e02c89 Mon Sep 17 00:00:00 2001 From: Tony Xiao Date: Sun, 23 Oct 2022 11:17:02 +0200 Subject: [PATCH] Only run migration on production --- apps/next/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/next/package.json b/apps/next/package.json index 4036df03..18fde759 100644 --- a/apps/next/package.json +++ b/apps/next/package.json @@ -3,9 +3,9 @@ "version": "0.0.0", "private": true, "scripts": { - "build": "run-s --silent build:*", + "build": "run-s build:*", "build:css": "pnpm run generate:css --minify", - "build:migration": "pnpm --dir ../../ migration up", + "build:migration": "if [ \"$VERCEL_ENV\" = production ]; then pnpm --dir ../../ migration up; else echo 'Skip non-production migration'; fi", "build:next": "next build", "dev": "run-p --silent dev:*", "dev:css": "pnpm run generate:css --watch",