winlin

update commit script

@@ -23,7 +23,8 @@ work_dir=`(cd ${work_dir}/.. && pwd)` @@ -23,7 +23,8 @@ work_dir=`(cd ${work_dir}/.. && pwd)`
23 product_dir=$work_dir 23 product_dir=$work_dir
24 24
25 # allow start script from any dir 25 # allow start script from any dir
26 -cd $work_dir && git checkout 2.0release 26 +cd $work_dir && work_branch=`git branch -a|grep "*"|awk '{print $2}'` && git checkout 2.0release
  27 +ret=$"; if [[ $ret -ne 0 ]]; then echo "switch branch failed. ret=$ret"; exit $ret; fi
27 28
28 . ${product_dir}/scripts/_log.sh 29 . ${product_dir}/scripts/_log.sh
29 ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi 30 ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
@@ -76,4 +77,7 @@ sync_push --tags srs.oschina @@ -76,4 +77,7 @@ sync_push --tags srs.oschina
76 sync_push --tags srs.gitlab 77 sync_push --tags srs.gitlab
77 ok_msg "push tags ok" 78 ok_msg "push tags ok"
78 79
  80 +git checkout $work_branch
  81 +ok_msg "switch to work branch $work_branch"
  82 +
79 exit 0 83 exit 0