代码拉取完成,页面将自动刷新
同步操作将从 TarsCloud/Tars 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (c) 2020
# Linux Foundation Projects
# Link: https://www.linuxfoundation.org/projects/
# TARS Foundation Projects
# Link: https://github.com/TarsCloud
# All rights reserved.
#!/bin/bash
#update & merge code tools
function show()
{
branch=$1
echo "tars:"; git branch -a | grep "*";
cd framework; echo "framework:"; git branch -a | grep "*";
cd tarscpp; echo "tarscpp:"; git branch -a | grep "*";
cd servant/protocol; echo "protocol:"; git branch -a | grep "*";
cd ../../../..
}
function update()
{
branch=$1
git submodule update --remote --recursive
cd framework; git checkout $branch; git pull --rebase;
cd tarscpp; git checkout $branch; git pull --rebase;
cd servant/protocol; git checkout $branch; git pull --rebase;
cd ../../../..
}
function merge()
{
version1=$1
version2=$2
cd framework; git checkout $version2; git pull $version2 --rebase; git checkout $version1; git merge $version2;
cd tarscpp; git checkout $version2; git pull $version2 --rebase; git checkout $version1; git merge $version2;
cd servant/protocol; git checkout $version2; git pull $version2 --rebase; git checkout $version1; git merge $version2;
cd ../../../..
}
function branch()
{
version1=$1
cd framework/tarscpp/servant/protocol; git checkout $version1;
cd ../..; git checkout $version1;
cd ..; git checkout $version1;
cd ..; git checkout $version1;
}
function commit()
{
version1=$1
cd framework/tarscpp/servant/protocol; git checkout $version1; git commit -a -m "update merge";
cd ../..; git checkout $version1; git commit -a -m "update protocol";
cd ..; git checkout $version1; git commit -a -m "update tarscpp";
cd ..; git checkout $version1; git commit -a -m "update framework";
}
function push()
{
version1=$1
cd framework; git checkout $version1; git push origin $version1;
cd tarscpp; git checkout $version1; git push origin $version1;
cd servant/protocol; git checkout $version1; git push origin $version1;
cd ../../../..;git checkout $version1; git push origin $version1;
}
version=$2
case $1 in
"show")
show
;;
"branch")
branch $2
show
;;
"update")
update $2
;;
"commit")
commit $2
;;
"push")
push $2
;;
"merge-master")
merge master release/2.4
;;
"merge-release")
merge release/2.4 master
;;
"all")
show
update release/2.4
merge-release
commit release/2.4
push release/2.4
update master
merge-master
commit master
push master
;;
*)
echo "$0 show, show all branch"
echo "$0 branch [branch], checkout to branch"
echo "$0 update [branch], update branch to new"
echo "$0 commit [branch], commit branch"
echo "$0 push [branch], push branch"
echo "$0 merge-master], checkout master and merge release to master"
echo "$0 merge-release], checkout relase and merge master to release"
echo "$0 all, do all"
;;
esac
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。