winlin

udpate github commit to git commit

@@ -35,35 +35,32 @@ function remote_check() @@ -35,35 +35,32 @@ function remote_check()
35 remote_check origin git@github.com:winlinvip/simple-rtmp-server.git 35 remote_check origin git@github.com:winlinvip/simple-rtmp-server.git
36 remote_check srs.csdn git@code.csdn.net:winlinvip/srs-csdn.git 36 remote_check srs.csdn git@code.csdn.net:winlinvip/srs-csdn.git
37 remote_check srs.oschina git@git.oschina.net:winlinvip/srs.oschina.git 37 remote_check srs.oschina git@git.oschina.net:winlinvip/srs.oschina.git
  38 +ok_msg "remote check ok"
38 39
39 function sync_push() 40 function sync_push()
40 { 41 {
41 - repository=$1  
42 - branch=$2  
43 -  
44 for ((;;)); do 42 for ((;;)); do
45 - git push $repository $branch 43 + git push $*
46 ret=$?; if [[ 0 -ne $ret ]]; then 44 ret=$?; if [[ 0 -ne $ret ]]; then
47 - failed_msg "提交$repository/$branch分支失败,自动重试"; 45 + failed_msg "Retry for failed: $*"
48 continue 46 continue
49 else 47 else
50 - ok_msg "提交$repository/$branch分支成功" 48 + ok_msg "Success: $*"
51 fi 49 fi
52 break 50 break
53 done 51 done
54 - ok_msg "$repository/$branch同步git成功"  
55 } 52 }
56 53
57 -sync_push origin master  
58 -sync_push origin 1.0release  
59 -sync_push srs.csdn master  
60 -sync_push srs.csdn 1.0release  
61 -sync_push srs.oschina master  
62 -sync_push srs.oschina 1.0release  
63 -ok_msg "sync push ok" 54 +sync_push --all origin master
  55 +sync_push --all origin 1.0release
  56 +sync_push --all srs.csdn master
  57 +sync_push --all srs.csdn 1.0release
  58 +sync_push --all srs.oschina master
  59 +sync_push --all srs.oschina 1.0release
  60 +ok_msg "push refs ok"
64 61
65 -sync_push srs.csdn --tags  
66 -sync_push srs.oschina --tags  
67 -ok_msg "sync tags ok" 62 +sync_push --tags srs.csdn
  63 +sync_push --tags srs.oschina
  64 +ok_msg "push tags ok"
68 65
69 exit 0 66 exit 0