qinglong/shell/rebuild.sh
whyour 8906472ae0 基础命令重构
1. 移除命令中 bash 依赖
2. jd命令重命名为js
3. 修改默认初始目录
4. 移除冗余代码
2021-03-25 23:44:57 +08:00

25 lines
451 B
Bash

#!/usr/bin/env bash
ShellDir=${QL_DIR:-$(cd $(dirname $0); pwd)}
echo -e "更新shell...\n"
cd ${ShellDir}
git fetch --all
git stash
git pull
git stash pop
git reset --mixed
echo -e "更新shell完成...\n"
echo -e "重新build...\n"
yarn install --registry=https://registry.npm.taobao.org
yarn build
yarn build-back
echo -e "重新build完成...\n"
echo -e "重启服务...\n"
pm2 restart panel
nginx -s reload
echo -e "重启服务完成...\n"