From f1826543666c326ab6894a2e3cde06ebf9112baf Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Tue, 26 Mar 2019 18:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20shell=20=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile-web/server/shell.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/mobile-web/server/shell.sh b/mobile-web/server/shell.sh index 5dc3deca7..0bb46672b 100644 --- a/mobile-web/server/shell.sh +++ b/mobile-web/server/shell.sh @@ -1,9 +1,9 @@ # 安装依赖包 -cd admin-web +cd mobile-web -cnpm install +npm install # 开始构建 @@ -17,11 +17,11 @@ mkdir app # 复制配置文件 -cp -rf config/server app/ +cp -rf server app/ # npm 构建项目 -npm run build:admin-web +npm run build # 复制文件到 server 努力 @@ -29,16 +29,18 @@ cp -rf dist app/server # 复制文件到 project 目录执行 -if [ ! -d "/work2/project/admin-web/server/dist" ]; then - rm -rf /work2/project/admin-web/server/dist +if [ ! -d "/work2/project/mobile-web/server/dist" ]; then + mkdir -pv /work2/project/mobile-web/server/dist +else + rm -rf /work2/project/mobile-web/server/dist fi -cp -rf app/server /work2/project/admin-web +cp -rf app/server /work2/project/mobile-web # 安装 server 依赖项 -cd /work2/project/admin-web/server +cd /work2/project/mobile-web/server -cnpm install +npm install # 启动服务 pm2 restart pm2.json