summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-07-24 14:56:25 +0300
committerLeif Åstrand <leif@vaadin.com>2012-07-24 14:56:25 +0300
commit76bfc960d36d6cb384d037c4a3a12b132e0d2556 (patch)
tree92195916c414e8bed92668ff81ce1b78d551be0a /scripts
parent0c093be6af6c9ea16a8fb446646a6fec08562d60 (diff)
downloadvaadin-framework-76bfc960d36d6cb384d037c4a3a12b132e0d2556.tar.gz
vaadin-framework-76bfc960d36d6cb384d037c4a3a12b132e0d2556.zip
Adjust merge check to work more nicely with team city
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/merge-check.sh17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/merge-check.sh b/scripts/merge-check.sh
index 0debea8b40..9b82a7b463 100755
--- a/scripts/merge-check.sh
+++ b/scripts/merge-check.sh
@@ -8,6 +8,9 @@ then
exit 3
fi
+testname="merge check for `pwd|sed "s/.*\///"`"
+echo "##teamcity[testStarted name='$testname' captureStandardOutput='<true/false>']"
+
command="git --no-pager log --no-color $SINCE..$UNTIL"
# TODO Why do I get whitespace in the beginning of the wc output?
change_count=`$command --oneline|wc -l|tr -d ' '`
@@ -15,10 +18,14 @@ change_count=`$command --oneline|wc -l|tr -d ' '`
if [ "$change_count" = "0" ]
then
echo "No unmerged commits"
- exit 0
+else
+ command="$command --format=short"
+ message="There are $change_count commits that have not been merged from $UNTIL to $SINCE"
+ echo $message
+ echo ""
+ $command
+ details=`$command|perl -p -e 's/\n/|n/' | sed "s/['\|\[\]]/|\&/g"`
+ echo "##teamcity[testFailed name='$testname' message='$message' details='|n$details']"
fi
-echo "There are $change_count commits that have not been merged from $UNTIL to $SINCE: "
-echo ""
-$command
-exit 1 \ No newline at end of file
+echo "##teamcity[testFinished name='$testname']"