Browse Source

002sync_code.sh

master
lizw 8 months ago
parent
commit
3cf5565db6
  1. 48
      dsl/002sync_code.sh

48
dsl/002sync_code.sh

@ -194,44 +194,14 @@ commit_target() {
git push origin $target_branch
}
source_pull
target_pull
source_build
target_pull
sync_files
target_build
commit_target
cmd=$1
kls_source_path=/home/www/sync_code/sd_dsl/wms85std-sd-dsl
echo -e "$echoPrefix cd $kls_source_path $echoSuffix"
cd $kls_source_path
echo -e "$echoPrefix git checkout -b main kls/main $echoSuffix"
git checkout -b main kls/main || true
echo -e "$echoPrefix git checkout main $echoSuffix"
git checkout main
echo -e "$echoPrefix git pull kls main:main -f $echoSuffix"
git pull kls main:main -f
if [ "$cmd" == "test" ];then
echo -e "$echoPrefix git push dsl main:release/test -f $echoSuffix"
git push dsl main:release/test -f
echo ""
echo "等待大参林能笑平台构建部署,约15分钟"
elif [ "$cmd" == "prod" ];then
echo -e "$echoPrefix git push dsl main:release/prod -f $echoSuffix"
git push dsl main:release/prod -f
echo ""
echo "等待大参林能笑平台构建部署,约15分钟"
elif [ "$cmd" == "develop" ];then
echo -e "$echoPrefix git push dsl main:develop -f $echoSuffix"
git push dsl main:develop -f
echo ""
echo "等待大参林能笑平台构建部署,约15分钟"
else
echo ""
echo "输入需要发版环境: test prod develop"
fi
#source_pull
#target_pull
#source_build
#target_pull
#sync_files
#target_build
#commit_target
echo "已废弃!!!"
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/dsl/002sync_code.sh)

Loading…
Cancel
Save