代码拉取完成,页面将自动刷新
#!/bin/sh
GIT_HOME=/developer/git-repository/
DEST_PATH=/product/front/
if [ ! -n "$1" ];
then
echo -e "Please input a project name! You can input as follows:"
echo -e "./fe-deploy.sh admin-v1-fe"
exit
fi
if [ $1 = "admin-v1-fe" ];
then
echo -e "---------Enter Project--------"
cd $GIT_HOME$1
else
echo -e "Invalid Project Name!"
exit
fi
# clean dist
echo -e "---------Clean Dist--------"
rm -rf ./dist
echo -e "---------Git Pull--------"
git pull
echo -e "---------Yarn Install--------"
yarn
echo -e "---------Yarn Run Dist--------"
yarn run dist
if [ -d "./dist" ];
then
echo -e "---------clean Dest--------"
rm -rf $DEST_PATH/dist
echo -e "---------copy Dest--------"
cp -R ./dist $DEST_PATH/$1/
echo -e "---------Deploy Success--------"
else
echo -e "---------Deploy Fail--------"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。