sync_vnet.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/bin/bash
  2. FILES=(udpproxy.go udpproxy_test.go udpproxy_direct.go udpproxy_direct_test.go)
  3. for file in ${FILES[@]}; do
  4. echo "cp vnet/$file ~/git/transport/vnet/" &&
  5. cp vnet/$file ~/git/transport/vnet/
  6. done
  7. # https://github.com/pion/webrtc/wiki/Contributing#run-all-automated-tests-and-checks-before-submitting
  8. cd ~/git/transport/
  9. echo ".github/lint-commit-message.sh" &&
  10. .github/lint-commit-message.sh &&
  11. echo ".github/assert-contributors.sh" &&
  12. .github/assert-contributors.sh &&
  13. echo ".github/lint-disallowed-functions-in-library.sh" &&
  14. .github/lint-disallowed-functions-in-library.sh &&
  15. echo ".github/lint-filename.sh" &&
  16. .github/lint-filename.sh
  17. if [[ $? -ne 0 ]]; then echo "fail"; exit -1; fi
  18. # https://github.com/pion/webrtc/wiki/Contributing#run-all-automated-tests-and-checks-before-submitting
  19. cd ~/git/transport/vnet/
  20. echo "go test -race ./..." &&
  21. go test -race ./...
  22. if [[ $? -ne 0 ]]; then echo "fail"; exit -1; fi
  23. echo "golangci-lint run --skip-files conn_map_test.go,router_test.go" &&
  24. golangci-lint run --skip-files conn_map_test.go,router_test.go
  25. if [[ $? -ne 0 ]]; then echo "fail"; exit -1; fi
  26. echo "OK"