代码拉取完成,页面将自动刷新
同步操作将从 happymmall/mmall-m 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# @Author: 15156
# @Date: 2018-05-31 13:20:24
# @Last Modified by: 15156
# @Last Modified time: 2018-06-22 17:52:13
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 mmall-m"
exit
fi
if [ $1 = "mmall-m" ];
then
echo -e "---------Enter mmall-m--------"
cd $GIT_HOME$1
elif [ $1 = "admin-fe" ];
then
echo -e "---------Enter admin-fe--------"
cd $GIT_HOME$1
elif [ $1 = "tmac-music" ];
then
echo -e "---------Enter tmac-music--------"
cd $GIT_HOME$1
elif [ $1 = "take-out" ];
then
echo -e "---------Enter take-out--------"
cd $GIT_HOME$1
else
echo -e "Invalid Project Name!"
exit
fi
# clean dist
echo -e "---------Clean Dist--------"
rm -rf ./dist
echo -e "---------Git Checkout Master--------"
git checkout master
echo -e "---------Git Pull--------"
git pull
echo -e "---------Yarn Install--------"
yarn
echo -e "---------Yarn Run Dist--------"
yarn run dist
if [ -d "./dist" ];
then
# bakeup dest
echo -e "---------Dest Bakeup--------"
mv $DEST_PATH/$1/dist $DEST_PATH/$1/dist.bak
echo -e "---------clean Dest--------"
rm -rf $DEST_PATH/$1/dist
echo -e "---------copy Dest--------"
cp -R ./dist $DEST_PATH/$1/
echo -e "---------Deploy Success--------"
else
echo -e "---------Deploy Fail--------"
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。