.coverity.sh 872 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. #
  3. # This sciprt is run by travis-ci and pushes the first commit
  4. # of the day to the coverity scan service
  5. #
  6. git fetch origin coverity_scan
  7. COMMITS=`git log --oneline --since=today.midnight | wc -l`
  8. if [[ "$COMMITS" -le "1" ]]; then
  9. #first commit a day - push changes to branch coverity_scan
  10. git clone -b coverity_scan https://$GITAUTH@github.com/acplt/open62541
  11. cd open62541
  12. git fetch origin
  13. git merge origin/master
  14. git config --global user.email "open62541-travis-ci@users.noreply.github.com"
  15. git config --global user.name "Open62541 travis-ci"
  16. git config --global push.default simple
  17. git add *
  18. git commit -am "push to coverity scan by travis-ci"
  19. git push https://$GITAUTH@github.com/acplt/open62541
  20. cd ..
  21. rm -rf open62541
  22. else
  23. echo "Not the first commit of the day - no push to coverity required"
  24. fi