由于centOS系统区分大小写
所以在创建文件夹时推荐使用全小写,在JS使用时候不易出现大小引入时候,出现路径失效问题
web端
#!/bin/bash
cd helper-website
git branch -a
# git checkout -b v1.0.1 origin/v1.0.1
echo "=============== 下载最新代码 ==============="
git pull
echo "=============== 更新依赖 ==============="
yarn install
echo "=============== 开始编译 ==============="
yarn build
echo "=============== 重启nginx ==============="
service nginx restart
# service nginx start
# service nginx stop
echo "=============== 完成 ==============="
服务端
#!/bin/bash
echo "关闭服务器"
cd helper-service
yarn stop
echo "服务器已关闭"
echo "从仓库更新"
git pull
echo "更新依赖"
yarn install
echo "启动"
yarn start
echo "完成"