]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix merge checker issues
authorLeif Åstrand <leif@vaadin.com>
Fri, 19 Oct 2012 12:26:14 +0000 (15:26 +0300)
committerLeif Åstrand <leif@vaadin.com>
Fri, 19 Oct 2012 12:26:14 +0000 (15:26 +0300)
scripts/merge-check.sh

index ef52cd44f4eb7ed0e799f651b0f3f18c9c49c20a..9e0d5e1e7575f37c9510043c150618dd7fac3c37 100755 (executable)
@@ -20,12 +20,19 @@ then
        echo "No unmerged commits"
 else 
        command="$command --format=short"
-       message="There are $change_count commits that have not been merged from $UNTIL to $SINCE"
+       message="There are $change_count commits in $UNTIL that are missing from $SINCE"
        echo $message
        echo ""
        $command
-       details=`$command|perl -p -e 's/\n/|n/' | sed "s/['\|\[\]]/|\&/g"`
+       # Escape []|' and newline with | to make teamcity happy
+       details=`$command|sed "s/[]['\|]/|&/g"|perl -p -e 's/\n/|n/'`
        echo "##teamcity[testFailed name='$testname' message='$message' details='|n$details']"
 fi
 
 echo "##teamcity[testFinished name='$testname']"
+
+# Give non-ok exit status
+if [ "$change_count" != "0" ]
+then
+       exit 1
+fi