Browse Source

01deploy.sh

master
lizw 2 years ago
parent
commit
bb3dfe2e2e
  1. 34
      90yvan/01deploy.sh

34
90yvan/01deploy.sh

@ -75,17 +75,17 @@ buildCode() {
echo "ui-pc 文件未变化"
fi
# 构建 wms-ui-mobile
# 构建 ui-mobile
if [ "${needBuild[2]}" != "0" ]; then
echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix"
cd "$codePath/wms-ui-mobile"
echo -e "$echoPrefix cd $codePath/ui-mobile $echoSuffix"
cd "$codePath/ui-mobile"
echo -e "$echoPrefix yarn $echoSuffix"
yarn
echo -e "$echoPrefix yarn link yvan-vue-mobile $echoSuffix"
yarn link yvan-vue-mobile
echo ""
else
echo "wms-ui-mobile 文件未变化"
echo "ui-mobile 文件未变化"
fi
# 构建 java
@ -211,17 +211,17 @@ startPcUi() {
}
#startMobileUi() {
# pid=`ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}'`
# pid=`ps -ef | grep "${codePath}/ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}'`
# if [ -z $pid ];then
# echo "wms-ui-mobile 未运行"
# echo "ui-mobile 未运行"
# else
# echo -e "$echoPrefix ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix"
# ps -ef | grep "${codePath}/wms-ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}' | xargs kill
# echo "wms-ui-mobile 已停止!"
# echo -e "$echoPrefix ps -ef | grep "${codePath}/ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix"
# ps -ef | grep "${codePath}/ui-mobile/node_modules/.bin/vite" | grep -v 'grep' | awk '{print $2}' | xargs kill
# echo "ui-mobile 已停止!"
# sleep 3s
# fi
# echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix"
# cd "$codePath/wms-ui-mobile"
# echo -e "$echoPrefix cd $codePath/ui-mobile $echoSuffix"
# cd "$codePath/ui-mobile"
# echo -e "$echoPrefix nohup yarn run dev >>/dev/null 2>&1 & $echoSuffix"
# nohup yarn run dev >>/dev/null 2>&1 &
#}
@ -229,15 +229,15 @@ startPcUi() {
startMobileUi() {
pid=`ps -ef | grep 'node server.js -P 8091' | grep -v 'grep' | awk '{print $2}'`
if [ -z $pid ];then
echo "wms-ui-mobile 未运行"
echo "ui-mobile 未运行"
else
echo -e "$echoPrefix ps -ef | grep 'node server.js -P 8091' | grep -v 'grep' | awk '{print \$2}' | xargs kill $echoSuffix"
ps -ef | grep 'node server.js -P 8091' | grep -v 'grep' | awk '{print $2}' | xargs kill
echo "wms-ui-mobile 已停止!"
echo "ui-mobile 已停止!"
sleep 3s
fi
echo -e "$echoPrefix cd $codePath/wms-ui-mobile $echoSuffix"
cd "$codePath/wms-ui-mobile"
echo -e "$echoPrefix cd $codePath/ui-mobile $echoSuffix"
cd "$codePath/ui-mobile"
echo -e "$echoPrefix yarn build $echoSuffix"
yarn build
echo -e "$echoPrefix nohup node server.js -P 8091 >>/dev/null 2>&1 & $echoSuffix"
@ -284,5 +284,5 @@ else
fi
fi
# 中通服-华为云-测试
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/hua_wei_yun/05wms-ztf-test.sh) [cmd profiles]
# 测试
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/90yvan/01deploy.sh) [cmd profiles]

Loading…
Cancel
Save