forked from 77media/video-flow
更新: 编译变量导入
This commit is contained in:
parent
e9cf23abb3
commit
a096d4a7bf
@ -38,9 +38,9 @@ if [ "$current_branch" = "$BRANCH_NAME" ]; then
|
||||
echo "On dev branch, building project..." | tee -a $LOGFILE
|
||||
PROFILE_ENV=$BRANCH_NAME
|
||||
|
||||
# 安装依赖并构建
|
||||
# 安装依赖并构建(通过 env-cmd 注入 .env.development 与 NODE_ENV)
|
||||
yarn install
|
||||
yarn build
|
||||
npx --yes env-cmd -f .env.development -e development bash -lc 'export NODE_ENV=development; yarn build'
|
||||
|
||||
# 准备dist目录
|
||||
mkdir -p dist
|
||||
|
||||
@ -38,9 +38,9 @@ if [ "$current_branch" = "$BRANCH_NAME" ]; then
|
||||
echo "On prod branch, building project..." | tee -a $LOGFILE
|
||||
PROFILE_ENV=$BRANCH_NAME
|
||||
|
||||
# 安装依赖并构建
|
||||
# 安装依赖并构建(通过 env-cmd 注入 .env.production 与 NODE_ENV)
|
||||
yarn install
|
||||
yarn build
|
||||
npx --yes env-cmd -f .env.production -e production bash -lc 'export NODE_ENV=production; yarn build'
|
||||
|
||||
# 准备dist目录
|
||||
mkdir -p dist
|
||||
|
||||
@ -94,6 +94,7 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/lodash": "^4.17.19",
|
||||
"env-cmd": "^10.1.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.2"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user