Commit ce839871 authored by QA-甘 盛聪's avatar QA-甘 盛聪

update

parent c95e1eed
...@@ -15,17 +15,17 @@ if [ -n "$project_folder" ];then ...@@ -15,17 +15,17 @@ if [ -n "$project_folder" ];then
git checkout ./ git checkout ./
if [ -n "$git_branch" ]; then if [ -n "$git_branch" ]; then
echo "checkout specified branch $git_branch" echo "checkout specified branch $git_branch"
git checkout $git_branch git checkout -f $git_branch
if [ $? = 0 ]; then if [ $? = 0 ]; then
echo "checkout branch $git_branch is ok". echo "checkout branch $git_branch is ok".
git pull git pull
else else
echo "Fail to checkout branch $git_branch". echo "Fail to checkout branch $git_branch".
exit -1 exit 1
fi fi
else else
echo "checkout default branch master" echo "checkout default branch master"
git checkout master git checkout -f master
git pull git pull
fi fi
else else
......
...@@ -19,7 +19,11 @@ function getCode() ...@@ -19,7 +19,11 @@ function getCode()
cd ./$project cd ./$project
git checkout ./ git checkout ./
if [ -n "$git_branch" ]; then if [ -n "$git_branch" ]; then
git checkout $git_branch git checkout -f $git_branch
if [ $? = 0 ]; then
echo "checkout branch $git_branch is ok".
else
echo "Fail to checkout branch $git_branch".
fi fi
git pull git pull
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment