#!/bin/bash
merge() {
source=$1
target=$2
git checkout $target
git pull
git merge $source --commit --no-edit
git push origin $target
}
pause() {
read -p "按任意键继续"
}
pname=$1
branch=${2:-"feature-2.0.2"}
if [ -z $pname ];then
echo "请输入工程名称"
exit 1
fi
cd $pname
git fetch
git checkout $branch
git pull
# pause
if [ $branch != dev ];then
merge $branch dev
# pause
fi
if [ $branch != release ];then
merge $branch release
echo $branch
# pause
fi
pause
# merge test local_trace
# pause
exit 0