|
|
|
@ -5,6 +5,8 @@ set -e |
|
|
|
codePath=~/ws/yxt_lmis |
|
|
|
pushPath=~/build/yxt_lmis |
|
|
|
pushGitUrl=ssh://www@122.9.140.63:3022/bot_yxt/yxt_lmis.git |
|
|
|
pushPath_2=~/build/yxt_lmis_report |
|
|
|
pushGitUrl_2=ssh://www@122.9.140.63:3022/bot_yxt/yxt_lmis_report.git |
|
|
|
gitUrlArr=( |
|
|
|
"www@git.yvanui.com:yvan-private/yvan-framework.git" |
|
|
|
"www@git.yvanui.com:jztd/thinkingwms-ui.git" |
|
|
|
@ -170,8 +172,61 @@ deployPush() { |
|
|
|
fi |
|
|
|
echo "" |
|
|
|
|
|
|
|
#--------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
# 更新push git |
|
|
|
pullCode $pushPath_2 $pushGitUrl_2 "master" "." |
|
|
|
|
|
|
|
# 同步 lmis-report-system/app/build/libs |
|
|
|
echo -e "$echoPrefix rsync -av --delete --exclude '.git/' --exclude 'client/' --exclude 'dist/' --exclude '*-javadoc.jar' --exclude '*-sources.jar' $codePath/lmis-report-system/app/build/libs/ $pushPath_2/ $echoSuffix" |
|
|
|
rsync -av --delete --exclude '.git/' --exclude 'client/' --exclude 'dist/' --exclude '*-javadoc.jar' --exclude '*-sources.jar' "$codePath/lmis-report-system/app/build/libs/" "$pushPath_2/" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# 同步 lmis-report-system/client/tsconfig.json |
|
|
|
echo -e "$echoPrefix rsync -av --delete --include 'tsconfig.json' --exclude '/*' $codePath/lmis-report-system/client/ $pushPath_2/client/ $echoSuffix" |
|
|
|
rsync -av --delete --include 'tsconfig.json' --exclude '/*' "$codePath/lmis-report-system/client/" "$pushPath_2/client/" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# 同步 lmis-report-system/client/node_modules |
|
|
|
echo -e "$echoPrefix rsync -av --delete --exclude 'yvan-ext/' $codePath/lmis-report-system/client/node_modules/ $pushPath_2/client/node_modules/ $echoSuffix" |
|
|
|
rsync -av --delete --exclude 'yvan-ext' "$codePath/lmis-report-system/client/node_modules/" "$pushPath_2/client/node_modules/" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# 同步 lmis-report-system/client/public |
|
|
|
echo -e "$echoPrefix rsync -av --delete $codePath/lmis-report-system/client/public/ $pushPath_2/client/public/ $echoSuffix" |
|
|
|
rsync -av --delete "$codePath/lmis-report-system/client/public/" "$pushPath_2/client/public/" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# 同步 yvan-ext |
|
|
|
echo -e "$echoPrefix rsync -av --delete --include 'assets/' --include 'build/' --include 'dist/' --exclude '/*' $codePath/yvan-ext/ $pushPath_2/client/node_modules/yvan-ext/ $echoSuffix" |
|
|
|
rsync -av --delete --include 'assets/' --include 'build/' --include 'dist/' --exclude '/*' "$codePath/yvan-ext/" "$pushPath_2/client/node_modules/yvan-ext/" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# 同步 lmis-report-system/dist |
|
|
|
echo -e "$echoPrefix rsync -av --delete $codePath/lmis-report-system/dist/ $pushPath_2/dist/ $echoSuffix" |
|
|
|
rsync -av --delete "$codePath/lmis-report-system/dist/" "$pushPath_2/dist/" |
|
|
|
echo "" |
|
|
|
|
|
|
|
# 提交文件 |
|
|
|
echo -e "$echoPrefix cd $pushPath_2 $echoSuffix" |
|
|
|
cd "$pushPath_2" |
|
|
|
if [ -n "$(git config user.name)" ]; then |
|
|
|
echo -e "$echoPrefix git config user.name 'bot' $echoSuffix" |
|
|
|
git config user.name 'bot' |
|
|
|
echo -e "$echoPrefix git config user.email 'bot@git.com' $echoSuffix" |
|
|
|
git config user.email 'bot@git.com' |
|
|
|
fi |
|
|
|
echo -e "$echoPrefix git add -A $echoSuffix" |
|
|
|
git add -A |
|
|
|
if [ -n "$(git status -s)" ]; then |
|
|
|
echo -e "$echoPrefix git commit -am 自动deploy提交 $echoSuffix" |
|
|
|
git commit -am "自动deploy提交" |
|
|
|
echo -e "$echoPrefix git push origin master $echoSuffix" |
|
|
|
git push origin master |
|
|
|
else |
|
|
|
echo "文件未变化不需要push" |
|
|
|
fi |
|
|
|
echo "" |
|
|
|
} |
|
|
|
|
|
|
|
isChange="1" # 仓库是否发生变化,0未:变化;非0:变化 |
|
|
|
|