.coverity.sh 889 B

1234567891011121314151617181920212223242526272829
  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 checkout coverity_scan
  7. COMMITS=`git log --since=today.midnight --oneline | wc -l`
  8. git checkout master
  9. if [[ "$COMMITS" -le "1" ]]; then
  10. #first commit a day - push changes to branch coverity_scan
  11. git clone -b coverity_scan https://$GITAUTH@github.com/acplt/open62541
  12. cd open62541
  13. git fetch origin
  14. git merge origin/master
  15. git config --global user.email "open62541-travis-ci@users.noreply.github.com"
  16. git config --global user.name "Open62541 travis-ci"
  17. git config --global push.default simple
  18. git add *
  19. git commit -am "push to coverity scan by travis-ci"
  20. git push https://$GITAUTH@github.com/acplt/open62541
  21. cd ..
  22. rm -rf open62541
  23. else
  24. echo "Not the first commit of the day - no push to coverity required"
  25. fi