Browse Source

first try to automatically merge master with coverity_scan branch
reffers to #47

Stasik0 10 years ago
parent
commit
de9bb00ae5
2 changed files with 25 additions and 0 deletions
  1. 1 0
      .travis.yml
  2. 24 0
      coverity.sh

+ 1 - 0
.travis.yml

@@ -39,3 +39,4 @@ after_success:
    - git add *
    - git add *
    - git commit -am "doxygen updated by travis-ci"
    - git commit -am "doxygen updated by travis-ci"
    - git push https://$GITAUTH@github.com/acplt/open62541
    - git push https://$GITAUTH@github.com/acplt/open62541
+   - ./coverity.sh

+ 24 - 0
coverity.sh

@@ -0,0 +1,24 @@
+#!/bin/bash
+
+#
+# This sciprt is run by travis-ci and pushes the first commit
+# of the day to the coverity scan service
+#
+
+COMMITS=`git log --since=yesterday | grep commit | wc -l`
+
+if [[ "$COMMITS" == "1" ]]; then
+    #first commit a day - push changes to branch coverity_scan
+    git clone -b coverity_scan https://$GITAUTH@github.com/acplt/open62541
+    cd open62541
+    git fetch origin
+    git merge origin/master
+    git config --global user.email "open62541-travis-ci@users.noreply.github.com"
+    git config --global user.name "Open62541 travis-ci"
+    git config --global push.default simple
+    git add *
+    git commit -am "push to coverity scan by travis-ci"
+    git push https://$GITAUTH@github.com/acplt/open62541
+    cd ..
+    rm -rf open62541
+fi