老师,自动化脚本问题,脚本发布失败,见下
来源:12-3 发布流程及发布脚本的开发
TheBayMax
2017-10-18
#!/bin/sh # #使用方法: #51maipai : front_deploy.sh 51maipai #wymaipai : front_deploy.sh wymaipai # GIT_HOME=/developer/git-repository/ DEST_PATH=/product/frontend/ # cd dir if [ ! -n "$1" ]; then echo -e "请输入要发布的项目!" fi if [ $1 = "51maipai"]; then echo -e "============== Enter 51maipai ==============" cd $GIT_HOME$1 elif [ $1 = "wymaipai" ]; then echo -e "============== Enter wymaipai ==============" cd $GIT_HOME$1 else echo -e "输入的项目名没有找到" exit fi # clear git dist echo -e "============== Clear Git Dist ==============" rm -rf ./dist # git 操作 echo -e "============== git checkout master ==============" rm -rf ./dist echo -e "============== git pull ==============" git pull # npm install echo -e "============== npm install ==============" npm install --registry=https:registry.npm.taobao.org # npm run dist echo -e "============== npm run dist ==============" npm run dist if [-d "./dist"]; then #backup dest echo -e "============== dest backup ==============" mv $DEST_PATH$1/dist $DEST_PATH$1/dist.bak #copy cp -R ./dist $DEST_PATH$1 #echo result echo -e "============== Deploy Success ==============" else echo -e "============== Deploy Error ==============" fi
项目名是自己取得,路径在码云上有的,改过几次名也找不到,和何解
写回答
1回答
-
Rosen
2017-10-18
扔出来报错信息
022017-10-18
相似问题