chore(deploy): choose start port by branch
This commit is contained in:
+3
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user