init-test.sh 627 B

123456789101112131415161718192021222324252627282930
  1. # place in root of zd code & change some vars & enjoy it!
  2. # $1: bin name
  3. # $2: branch name
  4. # $3: checkout commit
  5. function do_one {
  6. mkdir $1
  7. cd $1
  8. git init
  9. git remote add origin git@121.40.183.99:$1.git
  10. git fetch
  11. git checkout $3 -b $2
  12. git branch -d master
  13. git push origin $2
  14. git branch --set-upstream $2 origin/$2
  15. cd ..
  16. }
  17. branchname=test5
  18. cd p2p-back
  19. do_one testing $branchname ccf97e2037d330d504cd1edd14d0aaf536b403bd
  20. cd ..
  21. cd p2p-front
  22. do_one testing2 $branchname 603d5af52e270da0f1590d3d174a8941b132259d
  23. cd ..
  24. cd piaojuke_czbank_mobile
  25. do_one testing2 $branchname 603d5af52e270da0f1590d3d174a8941b132259d
  26. cd ..