chore(deploy): choose start port by branch

This commit is contained in:
2026-06-17 18:25:16 +08:00
parent bded7497d2
commit 15d322962e
2 changed files with 47 additions and 34 deletions
+3 -1
View File
@@ -6,7 +6,9 @@
"dev": "next dev",
"build": "next build",
"build:deploy": "pnpm install && pnpm run build",
"start": "next start -p 9135",
"start": "sh -c 'BRANCH=$(git branch --show-current); PORT=${PORT:-}; if [ -z \"$PORT\" ]; then if [ \"$BRANCH\" = \"main\" ]; then PORT=9185; else PORT=9135; fi; fi; next start -p \"$PORT\"'",
"start:test": "next start -p 9135",
"start:main": "next start -p 9185",
"build:start": "pnpm install && pnpm run build && pnpm run start",
"lint": "eslint",
"lint:fix": "eslint --fix",