.coverity.sh 941 B

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